cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ester
New Member

Outlook Calendar Flow is a Day Off

I created a simple flow to allow users to request time off through MS Forms. If it is approved, it will automatically add the request to a calendar.

The Flow works fine, but the date on the calendar is off by one day.  For example, if vacations were approved from 7/5/2021 to 7/9/2021 (5 days), the calendar shows 7/5/2021 to 7/8/2021, not including the last day. But if I double-click the event or place the mouse on top of it, it says 7/5/2021 to 7/9/2021 (the correct dates). 

 

What can I do to make the calendar show the last day of vacation? 

 

calendar 1.JPG

I thought it may have to do something with the event ending at 12:00 AM. If that's the case, the dates come from MS Form and don't include the time. How can I set it up to end at 11:30 PM?

 

This is the setup I currently have: 

Event flow.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
ccc333ab
Solution Sage
Solution Sage

Yes, the reason is the 12:00AM time. What I would do is something like just add the time of 11:59PM to the date, or use something like the following expression (this adds a day to the END Date and then subtracts a minute from it). 

 

 

 

addtotime(adddays(triggerBody()['date_1'],1),-1, 'minute', 'yyyy-MM-dd h:mm tt')

 

 

You can just create a Compose with this as its expression (replacing the triggerbody()['date_1] with your [Last Day Off] dynamic content.  Then use the Compose Output in your Create Event action (Or just create the expression directly into your Create Event action itself). 

View solution in original post

2 REPLIES 2
ccc333ab
Solution Sage
Solution Sage

Yes, the reason is the 12:00AM time. What I would do is something like just add the time of 11:59PM to the date, or use something like the following expression (this adds a day to the END Date and then subtracts a minute from it). 

 

 

 

addtotime(adddays(triggerBody()['date_1'],1),-1, 'minute', 'yyyy-MM-dd h:mm tt')

 

 

You can just create a Compose with this as its expression (replacing the triggerbody()['date_1] with your [Last Day Off] dynamic content.  Then use the Compose Output in your Create Event action (Or just create the expression directly into your Create Event action itself). 

View solution in original post

Thank you very much! I opted for adding "11:59 PM," and it worked! 

 

calendar 2.JPG

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

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.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Users online (2,479)