cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Amapola188
Helper II
Helper II

Convert Date String "25 Sep 2021" to Date

Good Morning

 

I'm trying to parse information from the body of an email to create a SharePoint entry. The email contains a date that formatted "d mmm yyyy", so today would be "25 Sep 2021". 

 

How can I convert that to a date that SharePoint can receive? All questions and answers on this topic I can find seem to deal with dates in 25/9/2021 format and my month is not a number so I don't know how to deal with that.

 

Thanks,

Christine

1 ACCEPTED SOLUTION

Accepted Solutions
abm
Super User
Super User

Hi @Amapola188 

 

Please see this post

 

Solved: Convert string (01 Sep 2006) to Date - Power Platform Community (microsoft.com)

 

Thanks



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

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

4 REPLIES 4
abm
Super User
Super User

Hi @Amapola188 

 

Please see this post

 

Solved: Convert string (01 Sep 2006) to Date - Power Platform Community (microsoft.com)

 

Thanks



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

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

Amapola188
Helper II
Helper II

@abm I hadn't even considered that it could be so easy!

 

Thank you!

VJR
Solution Sage
Solution Sage

Hi @Amapola188 

 

What is the date format you are looking for?

 

The formatDateTime function can give you just that

 

Example: 1

Are you taking small case m instead of M

 

If expression is
formatDateTime(triggerBody()['text'],'dd/M/yyyy')
VJR_0-1632546401606.png

 

 

Output is

VJR_1-1632546516401.png

 

 

Example 2:

If expression is
formatDateTime(triggerBody()['text'],'dd/MM/yyyy hh:mm:ss')

 

Output is

VJR_2-1632546609006.png

 

 

Example 3:

If expressions is
concat(formatDateTime(triggerBody()['text'],'dd-MM-yyyy'),'T',formatDateTime(triggerBody()['text'],'hh:mm:ss'),'Z')
 
 
Output is
VJR_3-1632547205067.png

 

 Example 4:
You can add the T within the Input box itself
 
VJR_5-1632547362626.png

 

 

 

 




-------------------------------------------
Help fellow beings find relevant posts.
Upvote to a supporting response.
Mark as solution to an answer.


 

Amapola188
Helper II
Helper II

Thanks, @VJR. Convert Time Zone did whatever was needed. To be honest, not sure what was needed. Sharepoint needed to accept the date ..

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!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Kudoed Authors
Users online (1,586)