Convert Time Zone in Power Automate

Do you need to convert time zone in Power Automate? In this Power Automate tutorial, I will explain how to convert time zone in Power Automate.

Managing time differences is expected in a world where people work in different time zones. This also applies to Power Automate. You may be wondering what time zone Power Automate utilizes as dates and timings are used a lot in your automated operations. The answer is that Power Automate works in Coordinated Universal Time (UTC).

In this tutorial, I will also explain:

  • Convert time zone in Power Automate
  • Power Automate converttimezone() function
  • convertfromutc() function in Power Automate
  • converttoutc() function in Power Automate
  • Power Automate convert utc to local time

Power Automate convert time zone

Here, we will see how to convert the time zone to the required time zone using the Convert time zone action in Power Automate.

With the Convert time zone action in Power Automate, we can convert the given timestamp from the source time zone to the destination time zone.

So, the Convert time zone action accepts 4 parameters. These are:

  • Base time: It is the time that we want to convert.
  • Source time zone: It is the time zone of your base time
  • Destination time zone: It is the time zone you want to convert
  • Format: It is optional. The result time zone will get formatted with the given format.
power automate convert time zone

Now let’s see an example, I have a timestamp ‘2023-11-01T06:43:59.5726039Z’ it is in ‘Coordinated Universal Time’ and we will convert it into timezone i.e. ‘(UTC-05:00) Eastern Time (US & Canada)’.

1. In Power Automate Cloud, create an Instant Cloud Flow and select Manually trigger a flow action.

convert time zone power automate

2. Next we will initialize a string variable and assign a timestamp, you want to convert. For this click on +New step -> select INitialize variable action. Then provide the below information:

  • Name: Provide the variable name
  • Type: Provide the type as a string
  • Value: Provide the value like below
power automate converttimezone

3. Now we will convert the time to another time zone, for this click on the +New step -> select ‘Convert time zone’ action. Then provide the below information

  • Base time: Select the timestamp variable from dynamic content
  • Source time zone: Select the source time zone
  • Destination time zone: Select the destination time zone
  • Format: Select the format of the time
convert time zone power automate

4. Now save the flow and run the flow manually, you can see the date and time converted to the destination time zone you have provided.

power automate convert time zone custom format

This is how to convert the date and time from one time zone to another time zone in Power Automate.

See also  How to Convert Float to Integer in Power Automate?

converttimezone() in Power Automate

Here, we will see how to convert the time zone to the required time zone using the converttimezone in Power Automate.

The converttimezone () function in Power Automate, is used to convert the timestamp from the source time zone to the destination time zone.

Syntax

convertTimeZone(<timestamp>, <sourceTimeZone>, <destinationTimeZone>, <format>)

Let’s see an example of how we can use the convertTimeZone () function in Power Automate.

For example, I have a timestamp and we will convert the UTC time zone to the Eastern time zone.

1. In Power Automate Cloud, create an Instant Cloud Flow and select Manually trigger a flow action.

converttimezone power automate

2. Next we will initialize a string variable and assign a timestamp, you want to convert. For this click on +New step -> select Initialize variable action. Then provide the below information:

  • Name: Provide the variable name
  • Type: Provide the type as a string
  • Value: Provide the value like below
power automate converttimezone

3. Next, we will convert the timezone, for this click on the +New step -> select Compose action. Then provide the below information

  • Inputs: Provide the below expression:
convertTimeZone(variables('timestamp'),'UTC', 'Eastern Standard Time', 'F')
converttimezone power automate

4. Now run the flow manually, and you can see the timestamp we have provided is converted to Eastern Standard Time.

convert timezone power automate

This is how to convert timestamp from one timezone to another timezone in Power Automate using converttimezone() in Power Automate.

convertfromutc function in Power Automate

Here, we will see how we can convert the UTC timestamp to the destination time zone using the convertFromUtc() function in Power Automate.

See also  How to get an item from a list using Power Automate Desktop?

The convertFromUtc() function in Power Automate converts the UTC timestamp to the destination time zone.

Syntax:

convertFromUtc(<timestamp>, <destinationTimeZone>, <format>)

Let’s see an example of how we can use the convertFromUtc() function in Power Automate.

For example, I have a timestamp ” and we will convert the UTC time zone to the Eastern time zone.

1. In Power Automate Cloud, create an Instant Cloud Flow and select Manually trigger a flow action.

converttoutc power automate

2. Here we will convert UTC to Eastern time zone, so, for this click on +New step -> select Compose action. Then provide the below information:

  • Inputs: Provide the below expression:
convertFromUtc(utcNow(), 'Eastern Standard Time','dd-MM-yyyy hh:mm tt' )
power automate convert from utc

3. Now save and run the flow manually, you can see the result below.

convert from utc power automate

This is how to convert UTC time zone to destination time zone Power Automate

convertToUtc() function in Power Automate

Here, we will see how to convert the time zone to UTC time zone in Power Automate.

The Power Automate convertfromutc() converts the timestamp from any timezone to the UTC time zone in Power Automate.

Syntax

convertToUtc(<timestamp>, <sourceTimeZone>, <format>)

For example, I have a timestamp and we will convert the time zone to the Utc time zone in Power Automate.

1. In Power Automate Cloud, create an Instant Cloud Flow and select Manually trigger a flow action.

power automate convert utc to local time

2. Next we will initialize a string variable and assign a timestamp, you want to convert. For this click on +New step -> select INitialize variable action. Then provide the below information:

  • Name: Provide the variable name
  • Type: Provide the type as a string
  • Value: Provide the value like below
power automate convert from utc

3. Here we will convert the timestamp to Utc, so, for this click on +New step -> select Compose action. Then provide the below information:

  • Inputs: Provide the below expression:
convertToUtc(variables('timestamp'),'UTC')
converttoutc power automate

3. Now save and run the flow manually, you can see the result below.

convert to utc power automate, convertfromutc() power automate

This is how to convert your time zone to UTC time zone in PowerAutomate.

See also  Copy List Items To Another List In SharePoint Using Power Automate

Power Automate converts UTC to local time

Here, we will see how to convert UTC to local time in Power Automate.

For example, we will convert utcNow() to local time in Power Automate. utcNow() will return the current date and time in ISO 8601 format.

1. In Power Automate Cloud, create an Instant Cloud Flow and select Manually trigger a flow action.

power automate convert utc to local time

2. Now we will convert UTC to local time zone, for this click on Add an action -> select Convert time zone action. Then provide the below information:

  • Base time: Provide the below expression
utcNow()
  • Source time zone: Select the source time zone
  • Destination time zone: Select the destination time zone
  • Format: Select the format of the date and time
power automate convert utc to local time

3. Now run the flow manually and you can see utcNow() is converted to local time in Power Automate.

power automate utcnow timezone

This is how to convert UTC to local time in Power Automate.

Conclusion

In this Power Automate tutorial, we saw how to use Power Automate convert time zone using convertfromutc() in Power Automate. Also, we covered different topics, these are:

  • Power Automate convert time zone action
  • Power Automate convertTimeZone function
  • convertFromUtc function in Power Automate
  • convertToutc() function in Power Automate
  • Power Automate convert UTC to local time

You may also like:

>