Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Convert String (mm/dd/yy) to Date format

(0) ShareShare
ReportReport
Posted on by 909 Super User 2024 Season 1

Hi,

 

I have the following column with dates - 

 

wonka1234_0-1694628678710.png

 

 

how can i convert this to a date? I eventually want to take the date string and subtract 30 days from it to get a new date.

 

trying this - 

 

wonka1234_0-1694628929391.png

 

getting error -

Unable to process template language expressions in action 'Compose' inputs at line '0' and column '0': 'In function 'formatDateTime', the value provided for date time string 'Date' was not valid. The datetime string must match ISO 8601 format.'.
  • Matthy79 Profile Picture
    4,178 Super User 2024 Season 1 on at
    Re: Convert String (mm/dd/yy) to Date format

    But you say your date is in a different time format. Why are you parsing it as „yyyy-MM-dd“?

     

    Please just add your date (without any expression) to a compose action and show the output.

  • creativeopinion Profile Picture
    10,439 Super User 2025 Season 1 on at
    Re: Convert String (mm/dd/yy) to Date format

    @wonka1234 Try this:

    addDays(formatDateTime([insert date here]),-30,'yyyy-MM-dd')
  • wonka1234 Profile Picture
    909 Super User 2024 Season 1 on at
    Re: Convert String (mm/dd/yy) to Date format

    @Matthy79  tried - parseDateTime('Date','en-US','yyyy-MM-dd') getting error

     

    Unable to process template language expressions in action 'Compose' inputs at line '0' and column '0': 'In function 'parseDateTime', the value provided for date time string 'Date' was not valid. The datetime string must match ISO 8601 format.'.
  • Matthy79 Profile Picture
    4,178 Super User 2024 Season 1 on at
    Re: Convert String (mm/dd/yy) to Date format

    Hello @wonka1234 

     

    Have you tried ParseDateTime?

  • wonka1234 Profile Picture
    909 Super User 2024 Season 1 on at
    Re: Convert String (mm/dd/yy) to Date format

    @creativeopinion  thanks. However I think my string needs to be converted to date format before i can add days..i think...

  • creativeopinion Profile Picture
    10,439 Super User 2025 Season 1 on at
    Re: Convert String (mm/dd/yy) to Date format

    @wonka1234 

    addDays([insert original date],(number of days to add/negative number to remove),'date-format-here')

     

    addDays([insert original date],-30,'yyyy-MM-dd')

    Hope this helps!


    If I helped you solve your problem—please mark my post as a solution ✅.
    Consider giving me a 👍 if you liked my response!

    👉 Watch my tutorials on YouTube
    👉 Tips and Tricks on TikTok

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >