Format Dates in Power Automate: the lazy (ABC) way!

You format dates in Power Automate, that’s probably not new news. Every single time I come to date formatting in my flows I find myself googling, fiddling with formula and always left thinking ‘this should be easier’. There is lots of handy documentation and blog posts out there on how to do it[1] but I want to show you a lazy, ABC (anything but code) way to do date time formatting and calculating in your flows. In this case I had a Date only field that had come from a document flow in SharePoint, I needed to add a time to it for creating an Event record in Dynamics Marketing.

Date Time action -

‘Convert Time Zone’

Stay with me here - I know you don’t want to convert the time zone, but this sneaky sausage does more than just time travel.

LazyDateFormatting2.png

Choose your date format

I took my date only field, set the time zones exactly the same but oh HELLO - check out all those date formats you can choose from!

FormatTIme.png

Proof is in the pudding

So my date now has a time element - great! Now to change the time…

AddTimeInteger.png

Add time

This is the second place I nearly crumbled and went to code as the hours time unit does not allow decimal point numbers. But time to think outside the box and get your calculator out.

AddTimeMinutes.png

More pudding proof

So 17.5 hours in minutes is 1050, yes I did use a calculator. Bazinga!

Happy anything but coding!

[1] formatDateTime formula cheat sheet - https://sharepains.com/2018/11/12/formatdatetime-flow-power-automate/

Previous
Previous

Face the fear of $expand and get the lookup values you deserve in Power Automate

Next
Next

Automatic captions for LinkedIn (and other) videos