How to handle date and time data.(Power Automate Cloud flows)

Japanese version.

Dates have numeric content in Excel, while many programming languages have a data type for dates and times, Power Automate handles dates as strings.

In addition, dates are in UTC (Universal Coordinated Time), which must be changed if they are to be handled in other locales.

Set the current time in a variable.

Specify the "variable type" as a string and the "value" as an expression as shown below.

Use the convertTimeZone and utcNow functions.

convertTimeZone(utcNow(), 'UTC', 'TimeZone')

Dynamic content, such as timestamps for triggers, is also If they are to be used in some form, it is easier to handle them by storing them in variables.

Format conversion.

For example, on August 9, 2020 at 22:30:40, the data would look like this

2020-08-09T22:30:40.9064463Z

As it is very difficult to understand when displayed as it is, the format conversion is necessary with the following expression.

Use the formatDateTime function.

formatDateTime(variables('variable name'), 'format')

Please change the red part in each case.

---

Links

Introduction(Power Automate Cloud flows)