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

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
Community Champion
Community Champion

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
Oliver_McErlane
Helper II
Helper II

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,091)