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 / How to transform diffe...
Power Automate
Unanswered

How to transform different date formats to yyyy-MM-dd

(0) ShareShare
ReportReport
Posted on by

Dear friends, 

 

I'm facing a case where the date format could be different from a document to another (I extract the date from pdf docs using AI Builder in the flow). I'd like to transform them into the format "yyyy-MM-dd", which can be recognized by the filter query of the SharePoint.

 

Different formats could be:

- 'dd.MM.yyyy'

- 'yy/MM/dd'

- 'dd-MM-yyyy'

 

When I tired to transform them to the yyyy-MM-dd using the "formatDateTime" expression, I usually face the error such as: "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 '14-03-2023' was not valid. The datetime string must match ISO 8601 format.'."

Jens_km_1-1680600931382.png

 

Could you suggest any solution for me? Thank you.

Categories:
I have the same question (0)
  • Chriddle Profile Picture
    8,706 Super User 2026 Season 1 on at

    parseDateTime(datestring, locale?, format?) returns an ISO 8601 formatted date string.

  • Riyaz_riz11 Profile Picture
    4,204 Super User 2026 Season 1 on at

    Hi @Jens_km ,

    I hope it will be reading system time format, first check while reading from ai builder which format you are getting else if you change format in SharePoint as a text format it will works fine.

     

    Regards

    Ahammad Riyaz

    --------------------------------------------------------------------------------
    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

     

  • Chriddle Profile Picture
    8,706 Super User 2026 Season 1 on at

    This expression can parse your mentioned formats:

    if(
    	contains(item(), '/'),
    	parseDateTime(item(), 'es-es', 'yy/MM/dd'),
    	parseDateTime(item(), 'es-es')
    )

     

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 474

#2
11manish Profile Picture

11manish 268

#3
David_MA Profile Picture

David_MA 243 Super User 2026 Season 1

Last 30 days Overall leaderboard