cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
wookietv
Level: Powered On

Can't create flow with proper dates on calendar

Hi,

 

I know this problem has come up probably 1000x but I still can't find a resolution that works for my case. I am trying to create a vacation/time off form. 

 

My flow follows this path:

  1. The user will fill out a sharepoint form embedded into a Teams tab. It includes 2 date fields for start and end dates. A dropdown box with a choice of reasons.
  2. Then it starts an approval process which sends an email for now to me (just for testing, eventually I'll add it so it recognizes the user's manager and sends to them)
  3. If rejected, it changes the status to rejected and sends an email to the user saying it was rejected.
  4. If approved, it changes the status to approved. It then creates an entry in a group calendar.
  5. It then sends an email to the user and CC's HR telling them it was approved and added to the calendar.

Clipboard02.jpg

The problem lies in the calendar part.

Since all date/time defaults to UTC and I'm in NY (Eastern time), it's adding the entry to the calendar 4 hours earlier. For example, if I put in a vacation request for Oct 5 to Oct 6, it's showing on the calendar as Oct 4 at 8pm to Oct 5 at 8pm.

 

Does anyone know what I could do to overcome that? I've been trying a bunch of things but can't get it to work properly, including converting time zone. Odd that time zone is not an option in Create item.

 

Thanks for any help you can offer.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Can't create flow with proper dates on calendar

Hi @wookietv,

 

Since UTC saves the time in Calendar for four hours earlier than the time the user submits, you could try to edit the start and end dates submitted by the user using the Expression---addHours() function.

For example, addHours(‘start date’, 4) will be saved in Calendar for the same time as the actual submission.

I did a test on my side, adding Dynamic content to addHours() plus the time difference. It work, as below:

30.PNG

When I submitted the time at 2018/10/10-2018/10/11, the correct time was recorded in Calendar:

31.PNG

Please take a try and let me know if issue still exist.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 REPLIES 2
Community Support Team
Community Support Team

Re: Can't create flow with proper dates on calendar

Hi @wookietv,

 

Since UTC saves the time in Calendar for four hours earlier than the time the user submits, you could try to edit the start and end dates submitted by the user using the Expression---addHours() function.

For example, addHours(‘start date’, 4) will be saved in Calendar for the same time as the actual submission.

I did a test on my side, adding Dynamic content to addHours() plus the time difference. It work, as below:

30.PNG

When I submitted the time at 2018/10/10-2018/10/11, the correct time was recorded in Calendar:

31.PNG

Please take a try and let me know if issue still exist.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
wookietv
Level: Powered On

Re: Can't create flow with proper dates on calendar

Hi,

 

Thank you for the reply.

I tried what you suggested, and it is working quite a bit better.

I just wish it didn't use times at all and can be flagged as an all day event.

Submitting a form that has vacation start date and end date (for example October 17 start to October 19 end), the end date is being put at Oct 19th at midnight. So on the calendar, it shows only 17 and 18 as blocked off.

 

I guess a workaround is rephrasing the end date as "What day will you return?"

 

Thanks!

 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 120 members 4,528 guests
Please welcome our newest community members: