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

Help with dates and arrays

Hello,

 

I need some help with a flow that I am building that delivers a weekly digest email to my team members about their booked leave. As teams doesn't have a leave allocation counter, I figure I can create an email that tells them what leave they have booked, put in their manual allowance and figure out how to count the number of days of holiday so that it shows a counter for them. 

 

I'm getting stuck on using dates to convert dates to a user date rather than a programmed output date which is not very friendly. 

 

My flow looks as follows:

 

craigmk1987_1-1602927154173.png

And

craigmk1987_2-1602927253232.png

And

craigmk1987_3-1602927333363.png

And then:

craigmk1987_4-1602927387579.png

And then:

craigmk1987_5-1602927427453.png

Which gives me the following output:

craigmk1987_6-1602927461109.png

What I'm hoping for is each holiday as a line, with it's start and end date rather than the same holiday repeating itself as it is above. I hope that's clear and any help is much appreciated.

 

Craig

1 ACCEPTED SOLUTION

Accepted Solutions
craigmk1987
Helper II
Helper II

I found the solution on another post, rather than having a convert function for each, I formatted the date using the following options in the create html table:

 

Start date:

formatDateTime(item()?['sharedTimeOff']?['startDateTime'], 'dd-MM-yyyy')

End date: 

formatDateTime(item()?['sharedTimeOff']?['endDateTime'], 'dd-MM-yyyy')
 
For anyone who wants to replicate. 

View solution in original post

2 REPLIES 2
craigmk1987
Helper II
Helper II

I found the solution on another post, rather than having a convert function for each, I formatted the date using the following options in the create html table:

 

Start date:

formatDateTime(item()?['sharedTimeOff']?['startDateTime'], 'dd-MM-yyyy')

End date: 

formatDateTime(item()?['sharedTimeOff']?['endDateTime'], 'dd-MM-yyyy')
 
For anyone who wants to replicate. 

Hi craigmk1987,

 

Thanks for sharing the solution.

 

Regards,

JAvier

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (1,971)