parseDateTime function(Power Automate Cloud flows)
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>')
Argument | Default | Description |
---|---|---|
timestamp | Required field | Specify the text to be converted from. |
format | Empty | Specify the locale for the text. |
locale | Default locale | Specify 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')


---
Discussion
New Comments
No comments yet. Be the first one!