Skip to main content

Notifications

Power Automate - Building Flows
Suggested answer

formatdatetime(utcnow() ,'M') = 13 January

(0) ShareShare
ReportReport
Posted on by
Everywhere I looked 'M' means one digit month but when I use it in scrip I get DD MMMM (e.g. 13 January). If I use 'MM' it becomes 01 as it should. What is going on?
 
BR
 
Pontus
  • Expiscornovus Profile Picture
    Expiscornovus 31,104 on at
    formatdatetime(utcnow() ,'M') = 13 January
     
    In addition to the link shared by @eetuRobo there is another link which might be useful.
     
    The custom date and time format strings article:
     
    That article has examples for the formats you are using.
     
  • Suggested answer
    eetuRobo Profile Picture
    eetuRobo 2,689 on at
    formatdatetime(utcnow() ,'M') = 13 January
    I think that is how it should work in .NET even thought it feels unintuitive

    https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings
     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,475

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,767

Leaderboard