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

Convert string yyyymmdd to a date time stamp

Hi,

 

I want to convert a string passed to my flow and convert it to a date eg. Monday 12th July

The string is passed in the format yyyymmdd

 

How can I do this?

 

Thanks for your help,

Ollie

1 ACCEPTED SOLUTION

Accepted Solutions

@Oliver_McErlane Here you have my friend

 

A tutorial https://www.christianabata.com/2020/07/convert-invalid-date-format-into-valid.html

 

And the flow exported https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/Convert-this-date-20200731-into-a-valid-...

 

I hope this can help

 



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

View solution in original post

7 REPLIES 7
ChristianAbata
Super User
Super User

hi @Oliver_McErlane  you could use Convert Time Zone

 

convert.PNG



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

InvalidTemplate. Unable to process template language expressions for action 'Convert_time_zone' at line '1' and column '2871': 'In function 'converttimezone', the value provided for date time string '20200731' was not valid. The datetime string must match ISO 8601 format.'.

oohh I see youe string is 20200731 so what you need to use is split your date to add a -  to separate your date



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

What would be the easiest way to convert 20200731 to 2020-07-31?

@Oliver_McErlane Here you have my friend

 

A tutorial https://www.christianabata.com/2020/07/convert-invalid-date-format-into-valid.html

 

And the flow exported https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/Convert-this-date-20200731-into-a-valid-...

 

I hope this can help

 



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

View solution in original post

Oliver_McErlane
Helper I
Helper I

Brilliant!

 

Thank you! 😀

@Oliver_McErlane  you are welcome you could like every post if you want jejeje



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

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.

Users online (2,905)