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

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 I
Helper I

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

 

Thank you!

VJR
Solution Supplier
Solution Supplier

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 I
Helper I

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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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.

Top Solution Authors
Users online (1,611)