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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,588)