parseDateTime function(Power Automate Cloud flows)

Japanese version.

Convert text that cannot be recognized as date/time into date/time format.

This is used for date and time items in files created by applications other than PowerAutomate and data sent by e-mail, etc., which often cannot be used as date and time without modification.

Spec

parseDateTime('<timestamp>', '<format>', '<locale>')
ArgumentDefaultDescription
timestampRequired fieldSpecify the text to be converted from.
formatEmptySpecify the locale for the text.
localeDefault localeSpecify the format of "timestamp".

How to use

In most cases, it is used in the "value" when initializing or setting variables of type "string".

Click on the "Expression" tab, parseDateTime, and the function name and () will be set in the expression field.

The first argument is the text to be converted and the second is the locale of the text.

When using dynamic content or variables, special specifications are required.

Click on the button, and if the display looks like the following, the setting is complete.

You can change the function by clicking this purple icon.

Formats such as 20220515 are not recognized as date and time.
In such a case, specify the format in the third argument.

For example,

parseDateTime('20220515', 'en-jp', 'yyyyMMdd')

---

Links

Date and time Functions(Power Automate Cloud flows)