Getting the current date and time is a common task I’ve performed in all of the applications I’ve worked with. However, I’ve always been able to return the date/time in my local time zone. This was easy because the date/time were configured to the date/time of the server the application was installed on. But, Power Automate doesn’t work that way. If you are going to work with date/time in Power Automate, give this a quick read to make sure you know how to get your local time.
Need to Know – UTC Format
Now, most data sources pass data back and forth with Power Automate in UTC format. What is UTC? UTC stands for Coordinated Universal Time.
Coordinated Universal Time (UTC) is the basis for civil time today. This 24-hour time standard is kept using highly precise atomic clocks combined with the Earth’s rotation.
https://www.timeanddate.com/time/aboututc.html
One of the things I didn’t quite understand when I first started working with UTC is that it is a standard, NOT a time zone.
UTC is the time standard commonly used across the world. The world’s timing centers have agreed to keep their time scales closely synchronized – or coordinated – therefore the name Coordinated Universal Time.
https://www.timeanddate.com/time/aboututc.html
How To Tell If Your Date Time is in UTC?
This is simple. If your datetime has a Z at the end, it means it’s in UTC time.
For example: 2020-04-10T01:28:14.0406387Z
If you want to learn more about UTC standards, check out the link from my quote above. But what does this mean practically for your flows?
Converting From UTC
Well, it means you need to convert from UTC format into your local time zone. Below, I created a very simple manual flow with 2 compose steps. The first step gets the date and time now. The function for getting the date and time now is utcNow(), implying the result will be returned in UTC format. The second step converts from UTC format to my local time, which is Mountain Standard Time. Here is a list of all the Power Automate time zones, so you can build your own conversion.
Now, compare the outputs of the utcNow() function to the conversion function. You can see they are different. And, the format is much easier to read in the converted output.
So, now you know a little bit more about working with date and time in Power Automate and how UTC might impact your flows.
Pingback: 4 Functions to Simplify Date & Time in Power Automate » The Analytics Corner
Pingback: What Are Power Automate Solutions? » The Analytics Corner