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 date format fr...
Power Automate
Answered

Convert date format from DD/MM/YYYY to timestamp

(0) ShareShare
ReportReport
Posted on by 10

I have a string date in the UK format "DD/MM/YYYY" when I insert this into a sharepoint date column it gets parsed as "MM/DD/YYYY". 

 

So when I insert "01/02/1990" (1st Feb 1990) it gets inserted as 2nd Jan 1990.

 

Is there a way to convert  "DD/MM/YYYY" to a timestamp (YYYY-MM-DD) so that the date can be inserted correctly. ?

 

I have looked at the formatDateTime function but the first argument to that expects only YYYY-MM-DD ?

Categories:
I have the same question (0)
  • MJain Profile Picture
    2,450 on at

    Hi @smistry ,

     

    You need to use convert time zone action to convert your date from source timezone to destination time zone before creating record.

     

    Thanks

  • smistry Profile Picture
    10 on at

    I get this error when doing that : 

     

     

    convert_timezone_error.png

     

     

    convert_tz_options.png

     

    It looks like I need a function that will convert DD/MM/YYYY to ISO-8601

  • MJain Profile Picture
    2,450 on at

    Hi @smistry ,

     

    Please refer to similar thread to convert this date 

     

    https://powerusers.microsoft.com/t5/Building-Flows/The-datetime-string-must-match-ISO-8601-format/td-p/383056

     

    Thanks

     

  • smistry Profile Picture
    10 on at

    I can't use that solution because the date comes from the user in the format 'DD/MM/YYYY' so I cant change it.

     

    In C# I could do this : 

     

    DateTime.ParseExact("24/01/2013", "dd/MM/yyyy", CultureInfo.InvariantCulture);

    Is there a way to do this in Power Flow?

  • MJain Profile Picture
    2,450 on at

    Hi @smistry ,

     

    If you know your source date format is fixed(UK) and destination format is also fixed , try to use formatDateTime from source and convert to Destination before inserting.

     

    Thanks

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi!

    You need to transcript your date into timestamp like that: 2020-06-19T17:26:02.1821723Z

    So you need:

    1. Use split expression and separate your date

    2. Use concat 

     

    concat(split('DD/MM/YYYY','/')[2],'-',split('DD/MM/YYYY','/')[1],'-',split('DD/MM/YYYY','/')[0],'-00T00:00:00.0000000Z') Here u have timestamp 🙂 

     

     

  • v-litu-msft Profile Picture
    Microsoft Employee on at

    Hi @smistry,

     

    You could use split() function convert the timestamp into an array, then restructure it by using index, for example:

    Annotation 2020-06-22 113540.jpg

     

    Result:

    Annotation 2020-06-22 113845.jpg

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    So it's same what I wrote however its only date string not timestamp. To get timestamp you need to add time to date as I wrote before 😉

  • v-litu-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

    Yeah, after I finished writing the reply, I found that you have written a similar method in the latest reply, and your method is very good.

     

    Best Regards,
    Community Support Team _ Lin Tu

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