cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
IMAX99
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
rsaikrishna
Super User
Super User

@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
rsaikrishna
Super User
Super User

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

 

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

@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

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
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 tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (2,796)