cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

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
Highlighted
Helper I
Helper I

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
Highlighted
Helper I
Helper I

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

Highlighted

Hi craigmk1987,

 

Thanks for sharing the solution.

 

Regards,

JAvier

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (8,280)