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

@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 User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (59,923)