Power Automate allows you to transform date data into various display formats. Here’s a summary of how to achieve this effectively.
- Date Time Zones and Formatting
- Functions for Specifying Date and Time Formats and Time Zones
- Convert from Coordinated Universal Time (UTC) to a Specified Time Zone: convertFromUtc
- Convert from One Time Zone to Another: convertTimeZone
- Convert from a Specific Time Zone to UTC: convertToUtc
- Convert Date and Time to a Specified Format String: formatDateTime
- Add or Subtract Time Units from a Specified Date/Time: addToTime, subtractFromTime
- Add or Subtract Time Units to/from the Current Date/Time: getFutureTime, getPastTime
- Related Articles
Date Time Zones and Formatting
To begin, let’s briefly explain the concepts of date and time display formats and time zones.
Time Zones
When working with dates and times, it’s essential to consider time zones if you need to account for time differences.
- Coordinated Universal Time (UTC): The global standard time
- Japan: UTC +9 hours
- US Eastern Time: UTC -5 hours
- US Pacific Time: UTC -7 hours
- Central European Time: UTC +1 hour
*Note: Daylight Saving Time is not considered here.
The utcNow function in Power Automate returns the current time in UTC. To obtain the current time in Japan, you can either “specify the time zone” or “add 9 hours to the utcNow function” result.

Date and Time Formatting
Formatting is used to specify how you want to display dates and times, such as “2021-01-27” or “27/01/2021 13:45:00” depending on your desired format.
There are “predefined formats” already available, but if none of them meet your needs, you can create a custom format.
- Short date format: 6/15/2009
- Full date in short format: Monday, June 15, 2009 1:45 PM
- General date in long format: 6/15/2009 1:45:30 PM
- RFC1123 pattern: Mon, 15 Jun 2009 13:45:30 GMT
- ‘yyyyMMdd’: 20090615
- ‘yyyy-MM-dd-HH:mm:ss’: 2009-06-15-13:45:30
- ‘yyMMdd(ddd)’: 090615(Mon)

For details on how to create custom formats, refer to this guide:

Functions for Specifying Date and Time Formats and Time Zones
Now, let’s dive into the main topic: introducing functions that allow you to convert date and time formats or change time zones.
Convert from Coordinated Universal Time (UTC) to a Specified Time Zone: convertFromUtc
convertFromUtc('timestamp', 'destinationTimeZone', 'format'?)
This function converts the time specified in the first argument as UTC to the time zone specified in the second argument.
The third argument, which is optional, allows you to specify the desired date format.
convertFromUtc(utcNow(), 'Tokyo Standard Time', 'G')

Convert from One Time Zone to Another: convertTimeZone
convertTimeZone('timestamp', 'sourceTimeZone', 'destinationTimeZone', 'format'?)
This function converts the time specified in the first argument from the time zone in the second argument to the time zone in the third argument.
The fourth argument, which is optional, allows you to specify the desired date format.
convertTimeZone('2021-01-27T16:45:00', 'Tokyo Standard Time', 'Hawaiian Standard Time', 'G')

Convert from a Specific Time Zone to UTC: convertToUtc
convertToUtc('timestamp', 'sourceTimeZone', 'format'?)
This function converts the time specified in the first and second arguments to UTC.
The third argument, which is optional, allows you to specify the desired date format.
The usage is almost identical to the previous functions, so it is omitted here.
Convert Date and Time to a Specified Format String: formatDateTime
formatDateTime('timestamp', 'format')
This function converts the time specified in the first argument into the format specified in the second argument.
In this function, specifying a format is mandatory.
formatDateTime(convertFromUtc(utcNow(), 'Tokyo Standard Time'), 'yy年MM月dd日のhh時mm分ss秒で曜日はdddd')

Add or Subtract Time Units from a Specified Date/Time: addToTime, subtractFromTime
addToTime('timestamp', interval, 'timeUnit', 'format'?) subtractFromTime('timestamp', interval, 'timeUnit', 'format'?)
This function adds or subtracts the time specified by the second and third arguments to the time provided in the first argument. The fourth argument for the format is optional.
- ‘Second’
- ‘Minute’
- ‘Hour’
- ‘Day’
- ‘Week’
- ‘Month’
- ‘Year’
addToTime(convertFromUtc(utcNow(),'Tokyo Standard Time'), 1, 'Week', 'd')
The result will look like this:
By the way, functions like addDays or addHours work similarly to addToTime but without the third argument, so their usage is nearly identical.


Add or Subtract Time Units to/from the Current Date/Time: getFutureTime, getPastTime
getFutureTime(interval, timeUnit, format?) getPastTime('timestamp', interval, 'timeUnit', 'format'?)
These functions are similar to addToTime and subtractFromTime but omit the first argument, allowing you to add or subtract time directly from the current date and time.


Although not covered this time, functions like dayOfWeek are also quite useful and will be introduced in the future.
コメント