cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Date Format in Microsoft Flow - String was not recognized as a valid DateTime.

I am currently trying to setup an outlook invitation as soon as somebody books annual leave in the HR system.

When somebody submits an annual leave request, the data (Leave Date, Name, Manager,Emails) will be picked up from Common Data Services and sent through as a outlook invite.

 

Flow1.PNG

 

On the End date I'm trying to add 23 hours on top of the date that is inputted.

Apparently the data picked up from CDS is not the correct format, please could somebody advise on what expression/formula I could use to fix this problem?

 

 

Thank you.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
LeeHarris
Solution Sage
Solution Sage

Hi @Anonymous 

I am making an assumption (which may be incorrect) based on the image you provided that you are setting the end date to the Dynamic Content value +23. In order to add hours to a date you should use the addHours expression. This takes a Date (your Dynamic Content) as the first parameter and then a number of hours to add as the second parameter. It will look something like the below.

 

addHours(DYNAMICCONTENT, 23)

 

This should be created in the expressions editor, replacing DYNAMICCONTENT with your Date Field that you wish to add the time to. In my example below I am just using a custom input as a placeholder value.

 

2020-01-21_11-59-41.gif

 

Hope that helps.

 


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Follow me on Twitter at @QG_LeeJHarris

Or on LinkedIn at in/leejharris

View solution in original post

2 REPLIES 2
LeeHarris
Solution Sage
Solution Sage

Hi @Anonymous 

I am making an assumption (which may be incorrect) based on the image you provided that you are setting the end date to the Dynamic Content value +23. In order to add hours to a date you should use the addHours expression. This takes a Date (your Dynamic Content) as the first parameter and then a number of hours to add as the second parameter. It will look something like the below.

 

addHours(DYNAMICCONTENT, 23)

 

This should be created in the expressions editor, replacing DYNAMICCONTENT with your Date Field that you wish to add the time to. In my example below I am just using a custom input as a placeholder value.

 

2020-01-21_11-59-41.gif

 

Hope that helps.

 


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Follow me on Twitter at @QG_LeeJHarris

Or on LinkedIn at in/leejharris

View solution in original post

Anonymous
Not applicable

@LeeHarris ,

 

Thank you very much!

Helpful resources

Announcements
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

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (67,784)