cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NWEASD
Helper III
Helper III

Unexpected format date time output

I created a power automate that is formatting date time to a number.  I would expect one result but getting something different.  Any thoughts on why this would be happening?

 

Here is my code 

int(formatDateTime(input date, 'yyyymmdd'))

So if I input 4/5/2021, for some reason I am getting 20210005

 

If you notice my month section is not turning up 04 which would be expected to be there.  Instead, I am getting 00 for a month.

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User III
Dual Super User III

Try this format instead

int(formatDateTime(input date, 'yyyyMMdd'))

'mm' in Power Automate pulls in the Minutes. 'MM' pulls in the Month.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

1 REPLY 1
Pstork1
Dual Super User III
Dual Super User III

Try this format instead

int(formatDateTime(input date, 'yyyyMMdd'))

'mm' in Power Automate pulls in the Minutes. 'MM' pulls in the Month.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Kudoed Authors
Users online (3,157)