I am working with converting/formating a date and all seems good, but then it rolls back a day.
I thought it may be the timezone setting, but when I changed it, nothing changed. Still one day back.
I even tried the long date version and it shows 8pm thinking it may have something to do with the time.
Thank you for your thoughts.
Solved! Go to Solution.
If you are not already doing so, when reading DateTime from Excel you can set the format to be ISO 8601 - which should format the Excel's integer dates (such as 44657) to the pattern YYYY-MM-DDTHH:MM:SS:xxxZ. All Dates and Times are considered Universal Time Code (UTC) for ISO 8601 and this explains the '”Z” at the end.
See: Excel Date changes in Power Automate
I'm still not clear why you are trying to "converting" from Eastern Standard Time to Eastern Standard Time in your flow. However, if all your dates are in Eastern Time the you could drop the Z at the end of the date time string and you should be able to see that the time does not roll back. You can use formatDateTime to do this:
formatDateTime('2022-04-06T00:00:00.00Z','yyyy-MM-dd')
Hope this helps.
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
I suspect that this is due to the Z specifier in the baseTime? If your datetime has a "Z" at the end, it means it is in UTC time. Try removing the Z specifier.
However, I don't understand what you are trying to achieve by "converting" from Eastern Standard Time to Eastern Standard Time in the Convert time zone action.
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
I am passing a date from excel.
And then get this.
I changed the time zones like you suggested and still get the same result.
If you are not already doing so, when reading DateTime from Excel you can set the format to be ISO 8601 - which should format the Excel's integer dates (such as 44657) to the pattern YYYY-MM-DDTHH:MM:SS:xxxZ. All Dates and Times are considered Universal Time Code (UTC) for ISO 8601 and this explains the '”Z” at the end.
See: Excel Date changes in Power Automate
I'm still not clear why you are trying to "converting" from Eastern Standard Time to Eastern Standard Time in your flow. However, if all your dates are in Eastern Time the you could drop the Z at the end of the date time string and you should be able to see that the time does not roll back. You can use formatDateTime to do this:
formatDateTime('2022-04-06T00:00:00.00Z','yyyy-MM-dd')
Hope this helps.
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
Really the only reason I was using the converting time zone was for the formatting of the date and time. I found that before I learned from you that I could do what I needed using the expression.
Thank you for helping and teaching me.
User | Count |
---|---|
87 | |
37 | |
23 | |
20 | |
16 |
User | Count |
---|---|
127 | |
49 | |
46 | |
27 | |
25 |