Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

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

Like (0) ShareShare
ReportReport
Posted on 11 Jun 2021 06:24:39 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
  • PMM Profile Picture
    14 on 11 Jun 2021 at 13:30:55
    Re: Convert time from dd/MM/yy to yyyy-MM-dd

    Hello,

     

    that worked. amazing

     

    Thank you

  • Verified answer
    Expiscornovus Profile Picture
    31,732 Most Valuable Professional on 11 Jun 2021 at 13:07:37
    Re: Convert time from dd/MM/yy to yyyy-MM-dd

    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 11 Jun 2021 at 11:49:22
    Re: Convert time from dd/MM/yy to yyyy-MM-dd

    Yes it is from same task ๐Ÿ™‚

     

    but still i get yyyy-dd-MM

    PMM_0-1623412152410.png

     

  • Expiscornovus Profile Picture
    31,732 Most Valuable Professional on 11 Jun 2021 at 08:17:57
    Re: Convert time from dd/MM/yy to yyyy-MM-dd

    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')

     

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

๐ŸŒธ Community Spring Festival 2025 Challenge Winners! ๐ŸŒธ

Congratulations to all our community participants!

Warren Belz โ€“ Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Communityโ€ฆ

Leaderboard >

Loading started