web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Convert String (mm/dd/...
Power Automate
Unanswered

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

(0) ShareShare
ReportReport
Posted on by 920 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.'.
Categories:
I have the same question (0)
  • creativeopinion Profile Picture
    10,502 Super User 2025 Season 2 on at

    @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

     

  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

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

  • Matthy79 Profile Picture
    4,180 Super User 2024 Season 1 on at

    Hello @wonka1234 

     

    Have you tried ParseDateTime?

  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    @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.'.
  • creativeopinion Profile Picture
    10,502 Super User 2025 Season 2 on at

    @wonka1234 Try this:

    addDays(formatDateTime([insert date here]),-30,'yyyy-MM-dd')
  • Matthy79 Profile Picture
    4,180 Super User 2024 Season 1 on at

    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.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard