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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (3,215)