Generate a date in your Flow
Recently quite a few citizen developer asked me how to format dates in Flow. Quite often people want to send dates in an email, however formatting these dates doesn’t seem to be that easy. In this post I will look at formatDateTime to format dates in Power Automate.
In my example I’m just going to take the current date and send it out by email:
This now gives me the following email:
OK, that is ugly!
formatDateTime flow function in Power Automate
Now I add Flow’s formatDateTime function and a format string ‘dd-MM-yyyy’.
and my date will appear in the European format of day-month-year.
For the full overview of the format strings please have a look at the formatDateTime function documentation
Other uses for the formatDataTime flow function
You can use the formatDateTime flow function to format dates and that is the most common use.
When you want to get for example just the day of the month or if you just want to get the hour of the time you could use the formatDateTime flow function as well.
Other date formatting posts