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 II
Super User II

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.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (1,614)