Convert Time Zone in Power Automate(MS Flow)

Introduction: In this blog, we will understand how we can convert Time Zone in Power Automate(MS Flow).

We will see how to work with the below functions in Power Automate.

  • convertFromUtc
  • convertTimeZone
  • convertToUtc

Convert UTC to IST

Example 1: Let’s say we want to convert Date from UTC to IST(Indian standard Time)

Steps to be followed:

  1. Go to Expression and search for convertFromUtc
  2. Select convertFromUtc.
  1. convertFromUtc requires below parameter.
convertFromUtc(timestamp: string, destinationTimeZone: string, format?: string)
  • timestamp: enter the date which you want to convert
  • destinationTimeZone: enter the Timezone in which you want to convert
  • format: enter the format in which you want to format the date

Refer to this blog to get the different formate of date and time in Power Automate.(https://vblogs.in/format-date-and-time-in-power-automatems-flow/)

Formula:

convertFromUtc(outputs('UTC_Date'),'India Standard Time','g')

Convert IST to Pacific Time

Example 1: Let’s say we want to convert Date from IST to Pacific Time

Steps to be followed:

  1. Go to Expression and search for convertTimeZone
  2. Select convertTimeZone.
  1. convertTimeZone requires below parameter.
convertTimeZone(timestamp: string, sourceTimeZone: string, destinationTimeZone: string, format?: string)
  • timestamp: enter the date which you want to convert
  • sourceTimeZone: enter the source Time Zone of date
  • destinationTimeZone: enter the Time Zone in which you want to convert
  • format: enter the format in which you want to format the date

Refer to this blog to get the different formate of date and time in Power Automate.(https://vblogs.in/format-date-and-time-in-power-automatems-flow/)

Formula:

convertTimeZone(outputs('IST'),'India Standard Time','Pacific Standard Time','g')

Convert Pacific Time to UTC

Example 1: Let’s say we want to convert the Date from Pacific Time to UTC

Steps to be followed:

  1. Go to Expression and search for convertToUtc
  2. Select convertToUtc.
  1. convertToUtc requires below parameter.
convertToUtc(timestamp: string, sourceTimeZone: string, format?: string)
  • timestamp: enter the date which you want to convert
  • sourceTimeZone: enter the source Time Zone of date
  • format: enter the format in which you want to format the date

Refer to this blog to get the different formate of date and time in Power Automate.(https://vblogs.in/format-date-and-time-in-power-automatems-flow/)

Formula:

convertToUtc(outputs('Pacific_Time'),'Pacific Standard Time','g')

NOTE:

You can find the Time Zone name in this blog. (https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones)

Using Date Time Connector of Power Automate to convert Time Zone

Steps to be followed:

  1. Search for Date Time connector and select Convert time zone action.
  1. Enter values in parameters.
  • Base Time: Enter the date which you want to convert
  • Source time zone: Enter the source Time Zone of date
  • Destination time zone: Enter the Time Zone in which you want to convert

Format string: enter the format in which you want to format the date

  • Add compose action to see the output of Convert time zone action.

Leave a Reply

Your email address will not be published. Required fields are marked *