Hello,
I am building a flow in which I add lines to an Excel file. I have a Date column in which I have to add dates that I read as strings with the following structure: dd.mm.yyyy (Example: 23.08.2022).
To add it to the Excel file, I pass it through the formatDateTime function to get the structure dd/MM/yyyy.
However, if I read that same Excel file in some flow, I get two different representations in the Date column: the internal Excel format for dates (Ex: 447744) in the rows that I modify outside Power Automate, and the dates I have added (Ex: 01/08/2022).
I need to read them in the same format so I can deal with them later. How do I get them stored in the same format?
Thank you in advance for any assistance you can provide.
Solved! Go to Solution.
Hello @Ggim ,
in regards of the dates that are represented by an integer, you should use the following expression:
addDays('1899-12-30','<your_value>','dd/MM/yyyy')
It means that you have to add 447744 days to the base date.
Please let me know if the issue is fixed.
If I have answered your question, please mark my post as Solved.
If you like my response, please give it a Thumbs Up.
My blog site about Power Automate: https://powerautomatejoy.com/
BR,
Marco
Hello @Ggim ,
in regards of the dates that are represented by an integer, you should use the following expression:
addDays('1899-12-30','<your_value>','dd/MM/yyyy')
It means that you have to add 447744 days to the base date.
Please let me know if the issue is fixed.
If I have answered your question, please mark my post as Solved.
If you like my response, please give it a Thumbs Up.
My blog site about Power Automate: https://powerautomatejoy.com/
BR,
Marco
It worked!
In case it might be useful to someone, I also found this article on how to convert dates to Excel Number, so they can be read later as Excel dates, and then use the expression you provided to work with them.
Thanks for your reply, best regards
User | Count |
---|---|
89 | |
41 | |
22 | |
20 | |
16 |
User | Count |
---|---|
138 | |
56 | |
47 | |
36 | |
25 |