Skip to main content

Notifications

Community site session details

Community site session details

Session Id : pTyX6jJ33yEKReX+iKUaFX
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,671 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,671 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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz โ€“ Community Spotlight

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

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 97

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 70 Super User 2025 Season 1

#3
David_MA Profile Picture

David_MA 48 Super User 2025 Season 1

Overall leaderboard