Formatting dates on Microsoft Flow

flow
#1

Hello gang, I was toying around with Microsoft Flow and was quite impressed by the way it could help me handle things on my corporate e-mail account.

Now I’m looking for a way to format the “Date received” info I can fetch from an e-mail message so I could use it to rename de file I have Flow download into an OneDrive folder.

Current implementation of my Flow fetches date in a very complex format, such as 2019-04-02T22_16_26 00_00. I was looking for a way to have it set just to 2019-04-02. Any tips?

0 Likes

#2

Working around my own problem, I’ve ended up using a “Expression” instead of Dynamic Content.

That Expression fetches the “now” date that should be off for a few minutes, since it will get the time when the Flow runs, not when the message was received.

The expression I’ve used was
formatDateTime(utcNow(),'yyyy-MM-dd')

Got the hint here: https://powerusers.microsoft.com/t5/General-Flow-Discussion/Formatting-Date-And-time-in-MS-Flow/td-p/138363

2 Likes