cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
xxxxmints
Helper IV
Helper IV

get zero in month value

Hello

 

My flow creates a folder with the year and month and surname as the folder name. So if today is 11 December, the folder is labelled 2212 Test. But if it is January then the result is 221 Test. 

 

I need it to be 2201 Test.

 

Can someone help me make sure the month is always 2 figures? Thanks in advance 🙂

 

2022-01-11 11_16_15-Edit your flow _ Power Automate.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User
Dual Super User

The fix is to not use the int() and make them string variables.  Your formatDateTime() will result in '01' as a string.  That is what you want to concat.  If you put it in an Int() it will convert the string '01' to the number 1.



-------------------------------------------------------------------------
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
Dual Super User

The fix is to not use the int() and make them string variables.  Your formatDateTime() will result in '01' as a string.  That is what you want to concat.  If you put it in an Int() it will convert the string '01' to the number 1.



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

Helpful resources

Announcements
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.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

AI Builder AMA June 7th carousel (up on May 25th, take down June 8th) (1).png

'Ask Microsoft Anything' about AI Builder!

The AI Builder team invite you to ask questions and provide helpful answers at our next AMA.

Users online (1,546)