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

Announcements

News and Announcements icon
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,508 Moderator 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,188 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,508 Moderator on at

    @wonka1234 Try this:

    addDays(formatDateTime([insert date here]),-30,'yyyy-MM-dd')
  • Matthy79 Profile Picture
    4,188 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 427

#2
Vish WR Profile Picture

Vish WR 316

#3
David_MA Profile Picture

David_MA 260 Super User 2026 Season 1

Last 30 days Overall leaderboard