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
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 tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (2,745)