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

DateTimeFormat

(0) ShareShare
ReportReport
Posted on by 46

G11_M_1-1649179489436.png

 

Hello all ,

      In the above image ,From should be the yesterday date and To should be the current date . The date field Dropdown has value  1 , 2 , 3 etc. So It wont access the value from the date drop down box  when I use the below Action to get the current date value. It takes only the value as 01, 02 , 03 . Any advice?

 

G11_M_2-1649179720550.png

 

  • VJR Profile Picture
    7,635 on at

    Hi @Gayu 

     

    What happens when you use only a single d?

  • Gayu Profile Picture
    46 on at

    when am using a sing 'd' it returns the entire date  format like (4/5/2022). And when am running it , It shows an error message like this.

    G11_M_0-1649243657869.png

     

  • Verified answer
    VJR Profile Picture
    7,635 on at

    okay then if there is no inbuilt formatting available then you can do something like this

     

    VJR_0-1649244011512.png

     

    VJR_1-1649244034645.png

     

     

    wscript.Echo(day("%CurrentDateTime%"))

  • Verified answer
    VJR Profile Picture
    7,635 on at

    okay then if there is no inbuilt formatting available then you can do something like this

     

    VJR_0-1649244011512.png

     

    VJR_1-1649244034645.png

     

     

    wscript.Echo(day("%CurrentDateTime%"))

  • Gayu Profile Picture
    46 on at

    Ok I will try this , But what happen if the date is two digit value i.e. 10, 11, 12 like this?

  • VJR Profile Picture
    7,635 on at

    The vbscript Day function returns a number between 1 and 31 that represents the day of the month.

  • Gayu Profile Picture
    46 on at

    Thanks for given the Right 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 249 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 198

#3
David_MA Profile Picture

David_MA 197 Super User 2026 Season 2

Last 30 days Overall leaderboard