In Power Automate, functions plays an important role for conversions, in order to quickly see how to Convert UTC Time to IST Time we use Instant Cloud flow.
Login to the required Power Apps environment using URL make.powerapps.com by providing user name and password and click on Flows on the left hand side as shown in the below figure.
After Step 1, click on New Flow and then select Instant Cloud Flow as shown in the below figure.
After Step 2, a new popup will be shown with title Build an instant cloud flow in that popup to the right side various triggers are shown, select Manually trigger a Flow and then click on Create Button as shown in the below figure.
After Step 3, a new screen will be displayed and provide the name Quick Conversion of UTC to IST and click on Save button and click on New Step as shown in the below figure.
After Step 4, a small window with title Choose an operation will be displayed with a search box. In that search box search for Compose and select Compose Action as shown in the below figure.
After Step 5, Action Compose will be shown with Input’s text box, select that text box and a related window will be shown in the right-hand side- with 2 tabs, Dynamic Content and Expression. Select Expression Tab and in fx textbox provide expression
and click on OK which will show time in UTC Time zone as shown in the below figure.
After Step 6, Add another Action Compose and in Inputs of this new compose give name as “IST Time” and provide the expression
convertFromUtc(utcNow(), ‘India Standard Time’)
where the function covertFromUtc have 2 parameters in the first parameter provided current UTC Time and the 2nd parameter provided the string ‘India Standard Time’ that is required for final result time zone and click on OK as shown in the below figure. To remove confusion renamed compose action present in Step 6 to UTC Time and click on Save.
After Step 7, to test this flow click on Test button at the top of the screen, if the flow Is fine then we should see next screen as shown in the below figure
After Step 8, a small window opens up select Manually option and click on Test button as shown in the below figure
After Step 9, another window comes with text Run flow and click on Run flow Button as shown in the below figure
After Step 10, flow run started successfully message and click on Done Button as shown in the below figure
After Step 11, window gets refreshed and you could see all the actions ran successfully with green tick mark as shown in the below figure
After Step 12, to test whether the values are changed to IST Time zone from UTC , open the actions and see the time stamps which infers conversion happened successfully as shown in the below figure
- Please make sure to save the flow for every operation.
- After expressions are given make sure to click either on OK or Update and see whether the value appears as expected in the input box.
- In case of any errors flow checker will provide you list of errors which is a button beside Run button.
- Refer to the time zone Id’s in this example we used “Indian Standard Time” , if you want to use others then refer to the Microsoft documentation https://docs.microsoft.com/en-us/previous-versions/windows/embedded/gg154758(v=winembedded.80)?redirectedfrom=MSDN