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 / Format Date string to ...
Power Automate
Answered

Format Date string to DateTime format

(0) ShareShare
ReportReport
Posted on by 93
 
Hi everyone,
 
I am getting dates from an Excel sheet, the ISO 8601 format seems to break if the format in the Excel sheet breaks. This often happens (the format in the excel sheet breaking) due to the number of people copying and pasteing into the sheet. I have therefore decided to import the dates as strings they are of the format '13.11.24'. I get the error: The template language function 'parseDateTime' was unable to find the locale associated with 'dd.MM.yy'. The provided locale name is either invalid or does not have a locale associated with it. 
 
Here is the code;
formatDateTime(parseDateTime(items('For_each_1')?['Start Date'],'dd.MM.yy'),'yyyy-MM-dd')
 
Any help would be appreciated.
TIA
Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,830 Most Valuable Professional on at
    The parsedatetime function has two parameters, the first one is the locale, the second one is the format.
     
    'dd.MM.yy' is not a locale, that's why it is confused.
     
    parseDateTime('<timestamp>', '<locale>'?, '<format>'?)
    Try the below instead:
    formatDateTime(parseDateTime(items('For_each_1')?['Start Date'], 'en-us', 'dd.MM.yy'),'yyyy-MM-dd')
     


    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, Bluesky profile or Youtube Channel
  • Verified answer
    NicolleAbraham Profile Picture
    93 on at
    Thanks Expiscornovus that helped with the error! 
     
    I then got another error realting to some dates changing to numbers. I had to go into excel and create a calculated table where all the data I would be pulling would be 100% clean in order to avoid any further Power Automate failures.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard