Conversion of Time and Date in MS flow
We had a requirement where we wanted to create a price list with current date time with respect to current country. In this blog we will use the OOB date conversion functionality.
Use Case : (UTC with )
We created a flow where we had used UTC now functionality but this was returning the value time value with -5.30 hours. After doing RND I come to know that it automatically adjust the time using our time zone. As you can see in the below screen shot.
To over come with this issue we need to use the inbuilt functionality convertTimeZone.
It takes below parameter
|Utcnow()||It is a string or function which contains the timestamp|
|UTC||The name for source time zone .
We can write source time zone which we want to convert into
|India Standard Time||The name for the target/destination time zone.
In this case we want to convert UTC into India Standard Time.
So the India Standard Time is a destination TimeZone
|Its a format in this case we wanted to convert into date and time dd/MM/yyyy HH:mm|
As you can see in the below screen i have converted UTC to India time zone.
convertTimeZone(utcnow(),’UTC’,’India Standard Time’,’dd/MM/yyyy HH:mm’)
As you can see in the below screen shot it shows the date time in the mentioned format or you can say indian format.
Hope this will help you to over come the time zone issue while working with different country time.
For more Time Zone conversion refer :