formatDateTime function(Power Automate Cloud flows)
Converts a date and time to text in an arbitrary format.
While parseDateTime is a similar conversion function, formatDateTime mainly converts date and time to text, parseDateTime mainly converts text to date and time.
Spec
formatDateTime('<timestamp>', '<format>', '<locale>')
Argument | Default | Description |
---|---|---|
timestamp | Required field | Specifies the date of the conversion source. Any format other than "yyyy-MM-ddTHH:mm:ss.ffffffffK" will result in an error. |
format | yyyy-MM-ddTHH:mm:ss.ffffffffK | Specifies the format of the result. If not specified, the format is "yyyy-MM-ddTHH:mm:ss.ffffffffK" as well as "timestamp". |
locale | Default locale | Specifies the locale of the text. This affects the use of full names (dddd) and abbreviated names (dddd). |
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, formatDateTime, and the function name and () will be set in the expression field.
The first argument is the date and time to be converted, and the second is the format.
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.
For those who want to learn Power Automate Cloud flow effectively
The information on this site is now available in an easy-to-read e-book format.
Or Kindle Unlimited (unlimited reading).
You willl discover how to about basic operations.
By the end of this book, you will be equipped with the knowledge you need to use Power Automate Cloud flow to streamline your workflow.
Discussion
New Comments
No comments yet. Be the first one!