Power Automate convert time zone

In this Microsoft Power Automate Tutorial, we will discuss how to convert time zone on Power Automate. The user gets their local time by converting the time zone. Also, we will learn:

  • Power Automate convert UTC to local time
  • Power Automate convert time format
  • Power Automate convert UTC to IST
  • Power Automate convert IST to Pacific Time
  • Power Automate convert Pacific time to UTC
  • Power Automate checking the time zone of an output
  • Power Automate convert time zone AM PM

There is a built-in operation named “Convert time zone” in Microsoft Power Automate. There are 2 methods by which we can convert the time zone on Microsoft flow. For this, here we have provided a step-by-step guide.

Method-1: Using convert time zone action

Step-1:

On Power Automate, first, we will add a trigger that will trigger the flow manually from instant cloud flow. Also, we will add the date as an input type where the user can insert a random date.

power automate convert time zone
power automate convert time zone

Step-2:

Then we will add the action “Convert time zone“. In that action, we can find 4 parameters are there; such as:

  • Base time: The datetime we want to convert
  • Source time zone: The time zone that the date time is currently in.
  • Destination time zone: The time zone that we want to convert our date to.
  • Format string: Its a pattern whether we want to format the date in to short time or long time.

For example, if we insert a date and want to convert it into the pacific timezone of the US and Canada.

convert time zone power automate
convert time zone power automate

Similarly, we can choose the date format from the Format string.

convert time zone Microsoft flow
convert time zone Microsoft flow

Now our flow is ready to run. So save it and test the flow by selecting a date.

How to convert Time zone on Power Automate
How to convert Time zone on Power Automate

We can see when we will insert any date or today’s date it will convert that into the /selected time zone.

Convert time zone on Power Automate
Convert time zone on Power Automate

Read Power Automate Concatenate String

Method-2: Using convert time zone expression

In this method, we will add a Compose action where we will use the convertTimeZone() expression.

In the ConvertTimezone(), we will need to pass below things; such as:

convertTimeZone(timestamp: string, sourceTimeZone: string, destinationTimeZone: string, format?: string)
  • Timestamp: The datetime we want to convert.
  • sourceTimeZone: The time zone of the date time is currently in.
  • DestinationTimeZone: The time zone we want to convert our date to.
  • Format: The pattern of the time zone we want to to convert the date to(optional).

convertTimeZone(triggerBody()['date'],'UTC','Eastern Standard Time', ' dddd, MMMM dd, yyyy')
Convert Time zone on Microsoft flow
Convert Time zone on Microsoft flow

Similarly, when we insert a date it will return the date as the targeted Time zone i.e. UTC- Eastern Standard Time. For example, we will insert 25-10-2021 as the trigger date or input date and the output will come like below:

How to Convert time zone on Power Automate
How to Convert time zone on Power Automate

In these above ways, we can convert the time zone on Power Automate. You can download the total flow from here. We hope it might help you.

Read Leave Request Approval Flow using Power Automate or Microsoft Flow

Power Automate convert UTC to local time

Now we will see how to convert UTC time(Coordinated Universal Time) to local time on Power Automate. Here we have provided a step-by-step guide to implement this.

Step-1:

First, we will trigger the flow manually on Power Automate from Instant cloud flow.

Step-2:

Then we will add an action as “Current time”.

Power Automate convert utc to local time
Power Automate convert UTC to local time

Step-3:

Then we will add another action Convert time zone. Where we will set the Current time as the Source time zone and then convert it to the Destination time zone.

convert UTC to local time Power Automate
convert UTC to local time Power Automate

Now the flow is ready to run. We can see the output after testing the flow:

Microsoft Flow convert UTC to local time
Microsoft Flow convert UTC to local time

As the current time zone is Wednesday, 27 October 2021, 5:10 PM so it is showing the same time by converting the UTC time.

This is how to convert UTC to local time on Microsoft flow.

Read How to convert decimal to whole number in Power Automate

Power Automate convert date time format

There are various date and time formats available in the Power Automate Convert time zone. We can see these formats on convert time zone action.

Power Automate convert time format
Power Automate convert time format

Also, we can format the string by using Custom values. Let’s take an example of the previous flow that we have created(convert UTC to local time zone). On that, we will insert a custom format string to format the local time zone by using FormatDateTime().

formatDateTime(body('Current_time'),'dd-MMMM-yyyy')
Power Automate convert time format string
Power Automate convert time format string

Previously the local time came as Wednesday, 27 October, 2021 5:10 PM but after inserting the custom format it will come as “27-October-2021“.

Power Automate convert date time format
Power Automate convert date time format

For example, we want to format the current date 2021-10-27 to 27-October-2021.

Also, we can use this same expression in Compose action to format the date-time:

convert time format Microsoft flow
convert time format Microsoft flow

Below we are presenting some useful tips to formatting the date-time(27-10-2021):

Formats Examples
dd 27
ddd Wed
dddd Wednesday
MM 10
MMM Oct
MMMM October
yy 21
yyyy 2021
h 12 hour time
hh hours(12 hour time)
HH 24 hour time
mm minutes
ss seconds
tt Joins AM or PM

Some Formatting examples are:

Formats Examples
MM/dd/yyyy 10/27/2021
yyyy-MMM-ddd 2021-Oct-Wed
yy/MMMM/dddd 27/October/Wednesday
dddd-MMMM-yyyy Wednesday-October-2021
MMMM dd-yyyy October 27-2021
dd-MM-yy 27-10-21
MMMM/dd/yyyyTHH:mm:ss October/27/2021T19:02:28
hh:mm:ss tt 01:31:20 PM
h:mm:ss tt 1:32:02 PM
MMMM/dd/yyyyTHH:mm October/27/2021T13:33

In this way, we can format the date-time in Power Automate.

Read What is Power Platform

Power Automate Convert timezone UTC to IST

In this example, we will see how to convert the timezone from UTC to IST. For this, the steps are:

Step-1:

First, we will add a Compose action that will show the current UTC.

utcNow()
Power Automate Convert UTC to IST
Power Automate Convert UTC to IST

Step-2:

Then add another Compose action to convert this UTC to IST by using an expression. For this, we will use the function convertFromUtc(). The syntax is:

convertFromUtc(timestamp: string, destinationTimeZone: string, format?: string)

Where,

  • timestamp- Insert the date that we want to convert.
  • destinationTimeZone- Insert the time zone in which we want to convert the date.
  • format- insert the format in which we want to format the date.

For this the expression is:

convertFromUtc(outputs('UTC_Now'),'India Standard Time','g')
Convert UTC to IST Power Automate
Convert UTC to IST Power Automate

Now our flow is ready to run. So just Save the flow and test it. We can see the output of UTC converted to IST.

Microsoft Flow Convert UTC to IST
Microsoft Flow Convert UTC to IST

This is how to convert timezone UTC to IST on Power Automate.

Check out, How to move files from OneDrive to SharePoint using Power Automate

Power Automate Convert IST to Pacific Time

Now we will see how to convert the time zone from IST to Pacific Time in Power Automate. For this, we will use an expression by adding a compose action.

On that expression, we will use the function convertTimeZone() that will convert the IST to Pacific time. The syntax for this function is:

convertTimeZone(timestamp: string, sourceTimeZone: string, destinationTimeZone: string, format?: string)

Where,

  • timestamp – insert the date that we want to convert.
  • sourceTimeZone – insert the source time zone of the inserted date.
  • desinationTiimeZone- insert the time zone that we want to convert the inserted date.
  • format- Insert the string format in which we want to format the date.

To convert the IST to Pacific time, the expression is:

convertTimeZone(outputs('IST_Time'),'India Standard Time','Pacific Standard Time','g')
Power Automate Convert IST to Pacific time
Power Automate Convert IST to Pacific time

We can see the output converted into Pacific time:

 Convert IST to Pacific Time Power Automate
Convert IST to Pacific Time Power Automate

This is how we can convert a timezone from IST to Pacific time on Power Automate.

Read Run Flow on a Schedule in Power Automate

Power Automate Convert Pacific time to UTC

Now, we will see how to convert the Pacific to UTC in Power Automate. Similarly, here we are going to use a function in the expression of compose action i.e. convertToUtc(). This will convert the Pacific time to UTC. The syntax is:

convertToUtc(timestamp: string, sourceTimeZone: string, format?: string)

Where,

  • timestamp- insert the date that we want to convert.
  • sourceTimeZone- insert the source time zone of the inserted date.
  • format- Insert the string format in which we want to format the date.

The expression is:

convertToUtc(outputs('Pacific_Time'),'Pacific Standard Time','g')
Power Automate Convert Pacific time to UTC
Power Automate Convert Pacific time to UTC

We can see the UTC time on the output of this flow:

Convert Pacific time to UTC Power Automate
Convert Pacific time to UTC Power Automate

This is how we can convert the time zone from Pacific time to UTC on Power Automate. You can download this whole flow from here.

Read Power Automate Delete all items in SharePoint list

Power Automate checking the time zone of an output

If we ensure about the current date-time timezone we can run the flow to get the timezone in output. Here, we will see how to check the time zone of output on Power Automate.

There is an action “Get forecast for today”, by using this we can get the current timezone:

Power Automate checking the time zone of an output
Power Automate checking the time zone of an output
checking the time zone of an output Microsoft Flow
checking the time zone of an output Microsoft Flow

This is how to check the time zone of an output Microsoft Flow.

Read PowerApps upload file to SharePoint document library

Power Automate convert time zone AM PM

Here we will see how to convert time zone to AM/PM format on Power Automate. Let’s take an example to convert the timezone of current UTC to AM/PM.

For current UTC we will use a function UTCNow() on Compose action:

UTCNow()
Power Automate convert time zone AM/PM
Power Automate convert time zone AM/PM

Then we will add a Compose action. On that compose action we will use formatDateTime() in an expression that will format the timezone in AM/PM:

formatDateTime(utcNow(),'yyyy/MM/dd hh:mm:ss tt')
convert time zone to AM PM Power Automate
convert time zone to AM PM Power Automate

We can see the output, is coming as AM PM format like below:

convert time zone AM PM Microsoft Flow
convert time zone AM PM Microsoft Flow

This is how to convert time zone to AM PM on Power Automate.

You may like the following Power Automate tutorials:

Conclusion

From this Power Automate tutorial, we learned all about Power Automate convert Time zone. Also, we discussed:

  • How to convert time zone using action on Power Automate?
  • How to convert time zone using expression on Power Automate?
  • How to convert UTC to local time on Power Automate?
  • What are the Power Automate convert time formats?
  • How to convert UTC to IST on Microsoft flow?
  • How to convert IST to Pacific time on Power Automate?
  • How to convert Pacific time to UTC Power Automate?
  • How to check the time zone of an output on Microsoft flow?
  • How to convert time zone to AM PM on Microsoft flow?
>