cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sreedwilson
Frequent Visitor

Time Zone Formatting between Forms and Flow

I have built a Form which captures a time for an event to start.  It is being input as a choice.

 

Flow then creates an event on the submitter's calendar and another person's calendar.

 

The time is always being recognized by Flow as AM.  I have tried 24 hour time, PM with spaces between the last digit and the P, and no spaces.  What am I missing?  I have the time zone correct.

 

Here is my expression: 

formatDateTime(body('Get_response_details')?['ref9d7b91bb8b21a5a729da14523a77bb'],'yyyy-MM-ddThh:mm:ss')
 
Here is my Flow: 
flow.png
 
Here is my Form:
 
form.png
 
Thanks for your input in advance!  
1 ACCEPTED SOLUTION

Accepted Solutions
v-yuazh-msft
Community Support
Community Support

 

Hi @sreedwilson

 

Please learn that the 12-hour time, you should keep all the time in the (0:00:00~11:59:59),you shouldn't have a time formated as (11/23/2018 18:30 PM), and the time should be (11/23/2018 6:3PM),

 

And please refer to the standard, I have created a Form with question as below:

Capture.PNG

 

You could refer to screenshot below to create the flow:

 

Capture.PNG

The expression in the Condition as below:

 

@equals(substring(outputs('Compose'), sub(length(outputs('Compose')), 2), 2), 'PM')

 

The expression in the Compose 2 as below:

 

first(split(addHours(formatDateTime(body('Get_response_details')?['rf89fb88ae1e04c87ace743cc695ef694'],'yyyy-MM-ddThh:mm:ss'),12),'.'))

 

The expression in the Compose 3 as below:

 

formatDateTime(body('Get_response_details')?['rf89fb88ae1e04c87ace743cc695ef694'],'yyyy-MM-ddThh:mm:ss')

 

And when a response is submited, if the time is with PM, the flow would run successfully as below:

 Capture.PNG

 

Best regards,

Alice

 

View solution in original post

2 REPLIES 2
v-yuazh-msft
Community Support
Community Support

 

Hi @sreedwilson

 

Please learn that the 12-hour time, you should keep all the time in the (0:00:00~11:59:59),you shouldn't have a time formated as (11/23/2018 18:30 PM), and the time should be (11/23/2018 6:3PM),

 

And please refer to the standard, I have created a Form with question as below:

Capture.PNG

 

You could refer to screenshot below to create the flow:

 

Capture.PNG

The expression in the Condition as below:

 

@equals(substring(outputs('Compose'), sub(length(outputs('Compose')), 2), 2), 'PM')

 

The expression in the Compose 2 as below:

 

first(split(addHours(formatDateTime(body('Get_response_details')?['rf89fb88ae1e04c87ace743cc695ef694'],'yyyy-MM-ddThh:mm:ss'),12),'.'))

 

The expression in the Compose 3 as below:

 

formatDateTime(body('Get_response_details')?['rf89fb88ae1e04c87ace743cc695ef694'],'yyyy-MM-ddThh:mm:ss')

 

And when a response is submited, if the time is with PM, the flow would run successfully as below:

 Capture.PNG

 

Best regards,

Alice

 

Thanks for pointing me in the right direction!

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (1,458)