cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Convert numeric month to text month

We have files being emailed in (1 per email) and the attachments are name eg 01-06-20. I would like to save the attachment out to SharePoint to the existing structure which has separate yearly folders with monthly sub-folders. I can get it all to work bar for one thing... The monthly folder needs to be as text ie Jan, Feb..... Dec. I can extract the numeric for the month but don't see how to get this as a text month.

Any suggestions? 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User II
Super User II

Re: Convert numeric month to text month

@IMAX99 

 

You can place a Compose action and use the following expression:

 

formatDateTime(utcNow(),'MMMM')
 
In the place of utcNow(), you can use your date field.
 
It will show the output as full month name ex: June.
 
Please let me know if you have any questions.
 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

 

View solution in original post

4 REPLIES 4
Highlighted
Super User II
Super User II

Re: Convert numeric month to text month

@IMAX99 

 

You can place a Compose action and use the following expression:

 

formatDateTime(utcNow(),'MMMM')
 
In the place of utcNow(), you can use your date field.
 
It will show the output as full month name ex: June.
 
Please let me know if you have any questions.
 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

 

View solution in original post

Highlighted
Super User II
Super User II

Re: Convert numeric month to text month

@IMAX99 

 

If you want as string, you can have the expression as below:

 

string(formatDateTime(utcNow(),'MMMM'))

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.
Super User III
Super User III

Re: Convert numeric month to text month

@rsaikrishna 

Great idea!  However, I don't believe that conversion to a string will be necessary - the output of formatDateTime is already a string.

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

Scott
Highlighted
Helper I
Helper I

Re: Convert numeric month to text month

I had already tried something along these lines but to use formateDateTime I have to parse a date value. What I have been doing is splitting the email subject into an array so that I have the day, year and month values as separate elements in order to place the attachment into the correct folder. I was then trying to parse the month value eg '06' and using the suggested method this caused an error.

I guess I'll need to extract the date value and parse that. 

Helpful resources

Announcements
secondImage

August 2020 CYST Winners!

Check out the winners of the recent 'Can You Solve These?' community challenge!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Users online (4,932)