Skip to main content

Notifications

Community site session details

Community site session details

Session Id : PENOHEkAccyNQf60cR/7Oz
Power Automate - General Discussion
Answered

Various ways to format date in long formats

Like (2) ShareShare
ReportReport
Posted on 27 Mar 2024 22:02:20 by 103

Dropping this here for someone starting out with Power Automate and having a hard time finding the right way to format dates.

* Get the year:

formatDateTime(triggerOutputs()?['body/start'],'yyyy')

Equals 2024

 

* Get the month:

formatDateTime(triggerOutputs()?['body/start'],'MM')

formatDateTime(utcNow(),'MMMM') which gives the result August.
so MM=08, MMM=Aug, MMMM=August

 

*Long format date

formatDateTime(triggerOutputs()?['body/start'],'MMMM dd, yyyy')

Equals March 27, 2024

 

*Get day of the week

formatDateTime(triggerOutputs()?['body/start'],'dddd MMMM dd, yyyy')

Equals Wednesday March 27, 2024

  • Verified answer
    CodeAvenue Profile Picture
    103 on 07 Aug 2024 at 19:07:10
    Various ways to format date in long formats
     

    Dropping this here for someone starting out with Power Automate and having a hard time finding the right way to format dates.
     

    * Get the year:

    formatDateTime(triggerOutputs()?['body/start'],'yyyy')

    Equals 2024

     

    * Get the month:

    formatDateTime(triggerOutputs()?['body/start'],'MM')

    formatDateTime(utcNow(),'MMMM') which gives the result August.
    so MM=08, MMM=Aug, MMMM=August

     

    *Long format date

    formatDateTime(triggerOutputs()?['body/start'],'MMMM dd, yyyy')

    Equals March 27, 2024

     

    *Get day of the week

    formatDateTime(triggerOutputs()?['body/start'],'dddd MMMM dd, yyyy')

    Equals Wednesday March 27, 2024

  • Chriddle Profile Picture
    7,716 Super User 2025 Season 1 on 28 Mar 2024 at 08:25:59
    Re: Various ways to format date in long formats

    There's a bit more to it (e.g. locale, single format specifier)

     

    To learn the basics I recommend to start here:

     

  • v-yueyun-msft Profile Picture
    on 28 Mar 2024 at 01:07:50
    Re: Various ways to format date in long formats

    Hi, @CodeAvenue 

    Thanks for sharing on the date format! You can use your own reply Mark as a solution, which can help more people!

     

    Best Regards,

    Yueyun Zhang

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

🌸 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…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - General Discussion

#1
Pstork1 Profile Picture

Pstork1 20 Most Valuable Professional

#2
Gprior Profile Picture

Gprior 19

#3
stampcoin Profile Picture

stampcoin 16

Overall leaderboard
Loading started
Loading complete