I made a SharePoint out of office calendar that employees can enter their requests for time off. An approval email is sent to their manager. The calendar allows for all day events or those with specific start and end times.
When someone enters an all day event, and you format it to just show the date (because the time is not important) the date time - convert time zone rounds an event end time to the next day! So the Sharepoint calendar shows it ending at 11:59 PM on day 1. The email formatted to just show the date rounds to day 2.
If you do show the time, it actaully changes both the start and end times. I've changed the input and output time zones and it still changes the times.
Has anyone else seen the time zone formatting not process an all day event from a calendar properly?
Hi @ DB1,
Could you please share a screenshot of the configuration of your flow?
Do you want to use the “Convert time zone” action to get the date of an all day event?
What has you filled in the “Destination time zone” field?
If you choose a time zone and the time zone would early or late than the UTC time “11:59 PM on day 1”, and the time would be converted to the Destination time “day 2”.If you choose a time zone the “(UTC) Coordinated Universal Time” in the “Source time zone” and “Destination time zone” field, the UTC time “11:59 PM on day 1” wouldn’t be converted to the Destination time “day 2”.
If you only want to get the date of the all day event,
I have made a test on my side, you could refer to screenshot below to create the flow to get the date of an all day event:
You could choose the “End Time” dynamic content of the trigger “When an item is created” in the “Base time” field of the “Convert time zone” action, choose the “Short date pattern – 6/15/2009 [d]” in the “Format string” field, choose the “(UTC) Coordinated Universal Time” in the “Source time zone” and “Destination time zone” field.
When an event is created in the calendar, the flow would run successfully as below:
Here is the part that matters. Notice the all day event starts on April 27th at midnight. This particular time was selected because in the calendar it was set as an "all day event". The person doesn't put in a time.
The Body output says April 26th!
Now the approval:
Here is the email that arrives:
Keep up to date with current events and community announcements in the Power Automate community.
A great place where you can stay up to date with community calls and interact with the speakers.
Check out the latest Community Blog from the community!