cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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.
Highlighted
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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Users online (4,081)