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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Convert time from dd/M...
Power Automate
Answered

Convert time from dd/MM/yy to yyyy-MM-dd

(0) ShareShare
ReportReport
Posted on by 14

Hello,

 

i stuck on this.

i have date 01/07/2021 dd/MM/yyyy i need convert it to 2021-07-01.

 

whatever commands or time converter i am using i get 2021-01-07 

convertTimeZone(outputs('Compose_4'),'UTC','Romance Standard Time','yyyy-MM-dd')
formatDateTime(outputs('Compose_4'),'yyyy-MM-dd')
 
any tips how convert it?
 
thank you
Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @PMM,

     

    Just to double check. Is this still the date you are extracting from the subject of an e-mail.

     

    Discussed in this thread:

    https://powerusers.microsoft.com/t5/Building-Flows/Extract-date-from-outlook-subject-or-body/m-p/949100

     

    If so, try and use this directly after your split action:

    formatdateTime(split(outputs('Html_to_text_2')?['body'], '_')[3], 'yyyy-MM-dd')

     

  • PMM Profile Picture
    14 on at

    Yes it is from same task 🙂

     

    but still i get yyyy-dd-MM

    PMM_0-1623412152410.png

     

  • Verified answer
    Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @PMM,

     

    Sorry, I misread your current format. It is actually the 1st of July and not the 07th of January, my bad 😁

     

    Try this instead:

    formatdatetime(formatdateTime(split(outputs('Html_to_text_2')?['body'], '_')[3], 'dd/MM/yyyy'), 'yyyy-MM-dd')

     

  • PMM Profile Picture
    14 on at

    Hello,

     

    that worked. amazing

     

    Thank you

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

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard