cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted

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
Highlighted
Super User III
Super User III

Re: Convert string yyyymmdd to a date time stamp

@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
Highlighted
Super User III
Super User III

Re: Convert string yyyymmdd to a date time stamp

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
Highlighted

Re: Convert string yyyymmdd to a date time stamp

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.'.

Highlighted
Super User III
Super User III

Re: Convert string yyyymmdd to a date time stamp

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
Highlighted

Re: Convert string yyyymmdd to a date time stamp

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

Highlighted
Super User III
Super User III

Re: Convert string yyyymmdd to a date time stamp

@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

Highlighted

Re: Convert string yyyymmdd to a date time stamp

Brilliant!

 

Thank you! 😀

Highlighted
Super User III
Super User III

Re: Convert string yyyymmdd to a date time stamp

@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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (5,627)