User Review( votes)
In this blog, we can see how we can convert DateTime type field to the various format using formatDateTime function. Please find the syntax of formatDateTime function:
One of our clients wanted to see the last modified date and time of individual Account record. Also, he wants to see this modified date and time in specific format such as “Monday 23-Nov-2020 6:24 AM”.
We have created one Microsoft Flow which will trigger on Account record update and on update of account record we are get the current Date Time value using utcNow() function and convert it in to specific format that client wants and finally update formatted date in to current record as shown in below screenshot:
After run the below flow on update of Account it will take the proper output as show in below screenshot:
Please find below more examples for different date time formats using formatDateTime() function:
- formatDateTime(utcNow(),’MM/dd/yyyy h:mm tt’)
- formatDateTime(utcNow(),’dd-MMMM-yyyy h:mm tt’)
- formatDateTime(utcNow(),’dd-MMM-yyyy h:mm tt’)
With help of formatDateTime function we can easily convert DateTime and Date field value into various ISO DateTime formats.