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 Automate
Answered

Date formatting

(0) ShareShare
ReportReport
Posted on by 30

Is there any way to change the formatting that the CurrentDateTime function outputs? The default seems to be to output dates without a leading zero (i.e. April is represented with just '4'). However, my web form that I am trying to automate is strict and requires a leading zero for month and day numbers (i.e. April needs to be represented with '04').

 

Any insights much appreciated.

I have the same question (0)
  • Tejashree_G Profile Picture
    43 on at

    using "get current date and time " action you will get current time and date with dd-MM-yyyy format for ex: today's date is "21-04-2021 and time" like this

  • Tejashree_G Profile Picture
    43 on at

    Tejashree_G_0-1618997697654.png

    this is just a example

  • Verified answer
    fraenK Profile Picture
    2,125 on at
  • IKinal Profile Picture
    30 on at

    Unfortunately, I need just the date, without the time. Even though I selected to retrieve the current date only, it still stores an empty time, just like in your screenshot. In order to get around this, I tried to reconstruct the date manually, but CurrentDateTime.Month returns '4', instead of '04'. My web application is rejecting this.

  • IKinal Profile Picture
    30 on at

    Thanks - that gave me the ability to convert the date into the exact format that I needed.

  • jkb6011 Profile Picture
    122 on at
    This should not be considered a solution.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard