cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NguyenHuu
Helper IV
Helper IV

How to collect correct time in Send an email V2 from Calendar?

Hi everyone,

I collect time( StartTime and EndTime) from Calendar by Send an email V2 but the result not correct as i  aspect so do you have any solution?

 Flow:

 

NguyenHuu_2-1632198563664.png

 

 

Calendar:

 

NguyenHuu_1-1632198547069.png

 

Result:

NguyenHuu_0-1632198518243.png

 

 

 

Also how to avoid double book in calendar?

Thanks for you help. 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
eric-cheng
Solution Sage
Solution Sage

Hi @NguyenHuu ,

 

You will need to separate them into two actions.  Example below

 

ericcheng_0-1632206711564.png

ericcheng_2-1632206764084.png

ericcheng_4-1632206843737.png

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

 

View solution in original post

eric-cheng
Solution Sage
Solution Sage

Hi @NguyenHuu ,

 

Paste the format string into the area marked in red

 

 dd-MM-yyyy hh:mm tt

 

NguyenHuu_0-1632208595683.png

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

View solution in original post

10 REPLIES 10
eric-cheng
Solution Sage
Solution Sage

Hi @NguyenHuu ,

 

You may need to convert the time zone.  You can either use converTimeZone() or the action below.

 

ericcheng_0-1632202575383.png

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

 

Thanks @eric-cheng ,

Do i wrong something? How can i know the current time zone of SharePoint to put  at Source time zone?

My flow:

NguyenHuu_1-1632205891765.png

Error:

 

NguyenHuu_0-1632205825922.png

 

Do you know how to avoid double book in Calendar? it mean user can't book the same time with another user on one day.

Thanks!

eric-cheng
Solution Sage
Solution Sage

Hi @NguyenHuu ,

 

You will need to separate them into two actions.  Example below

 

ericcheng_0-1632206711564.png

ericcheng_2-1632206764084.png

ericcheng_4-1632206843737.png

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

 

View solution in original post

Thanks @eric-cheng ,

It's work.

What the value i should put at "Format string" to  change format time to: hh:ss tt dd-mm-yyyy?

NguyenHuu_0-1632208595683.png

How can i avoid to double booking at the same time?

NguyenHuu_1-1632208716236.png

Thank you so much.

eric-cheng
Solution Sage
Solution Sage

Hi @NguyenHuu ,

 

I dont think you need to specify your datetime in that exact format.  Maybe just try:

 

dd-MM-yyyy hh:mm tt

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

 

Hi @eric-cheng ,

I use the format: FormatDateTime(triggerOutputs()?['body/Start'],'hh:ss dd-MM-yyyy') to change it but 

there is error:

NguyenHuu_0-1632210227016.png

Do you know how to fix?

eric-cheng
Solution Sage
Solution Sage

Hi @NguyenHuu ,

 

Paste the format string into the area marked in red

 

 dd-MM-yyyy hh:mm tt

 

NguyenHuu_0-1632208595683.png

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

View solution in original post

Thanks @eric-cheng 

it's work 🙂

How about avoid book double in Calendar?

Thanks.

eric-cheng
Solution Sage
Solution Sage

Hi @NguyenHuu ,

 

Because your flow is triggered after the item is created, this may be difficult.

 

I am not sure if there is a feature on the SP side but you could add a status column where all bookings default to pending.  The flow will check whether another booking exists and if not, set the status to approve, otherwise, it will delete the booking and send an email.  Here is an example.

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

 

 

Thanks for your help and sharing @eric-cheng .

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Users online (1,471)