cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
enswitzer
Helper II
Helper II

Flow Output Date Formatting

I have a flow that creates a table (below) and sends it in an e-mail each week. However, I can't seem to get the formatting right on dates and numbers. How can I show the "Months Pushed Out" as only whole numbers, and the date at the top in YYYY-MM-DD format instead of with time?

 

 

enswitzer_0-1610978189771.png

 

enswitzer_1-1610978296602.png

 

 

2 REPLIES 2
fchopo
Super User
Super User

Hello @enswitzer 

For the "Months Pushed Out" expression, you should use the following expression:

int(first(split(string(item()?['MonthsPushedOut']),'.')))

Which converts the number to a string, get the number before the "." and converts it to integer.

 

And for the date at the top (I suppose it is written in the email) you should use:

formatDateTime(your_date,'yyyy-MM-dd')

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

Seemingly no matter what I do  - this Months one fails and gives me this Error:

Unable to process template language expressions in action 'Set_variable' inputs at line '1' and column '23678': 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,906)