cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sb-hog
New Member

Formatting utcNow() don't work

Good morning!

 

I have a problem with the function of utcNow(), resp. the formatting.

In every programming language, in every YoutTube-Video that I have seen for this funtion were explained, that when you format a date with 'M' you get only the month as a number. 

 

In my flow I get utcNow('M') = 'August 11' and I'm short to explode for this not logical result.

Why I get the name of month and the day as a number????? I can not understand this.

 

My aim is '8'

 

What I'm doing wrong????

1 ACCEPTED SOLUTION

Accepted Solutions
tom_riha
Super User
Super User

Hello @sb-hog ,

a single character is often a standard format string: https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings, you can use MM instead, even though it’ll display 08 and not just 8.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

2 REPLIES 2
tom_riha
Super User
Super User

Hello @sb-hog ,

a single character is often a standard format string: https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings, you can use MM instead, even though it’ll display 08 and not just 8.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]
sb-hog
New Member

Thanks @tom_riha for your solution. Now I do this with int(utcNow('MM')).

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (2,117)