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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Format Date string to ...
Power Automate
Unanswered

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,181 Most Valuable Professional on at
    Format Date string to DateTime format
    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
    Format Date string to DateTime format
    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

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 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard