Convert month number to month (month period)

Highlighted
Occasional Contributor

Convert month number to month (month period)

Hi,

 

I am looking for a way to convert a month number (f.e. 1) to month name (f.e. 'Jan 20'). 

How would you do this? 

 

Kind regards,

Catheline 

9 REPLIES 9
Highlighted
Master Anaplanner/Community Boss

Re: Convert month number to month (month period)

@Catheline 

 

It surely is achievable but it would be great if you can post some screenshot on what exactly are you trying to do? Do you have any global module? Are you using Native timescale? Number 1 will be considered as Jan in all the years, are you furnishing Year number as well anywhere?

 

Highlighted
Master Anaplanner/Community Boss

Re: Convert month number to month (month period)

@Catheline 

 

See if this helps

 

Step 1: Create a Fake Months List 

Misbah_0-1591360066962.png

Step 2: Create one Global module. Month from Native Time Scale line item is what you are interested in.

Misbah_1-1591360110686.png

Misbah_2-1591360131594.png

 

Highlighted
Master Anaplanner/Community Boss

Re: Convert month number to month (month period)

@Misbah ,

 

Flip your list around, instead of having Jan, Feb, Mar, etc as the code, have that as the name and the code be 1, 2, 3, 4, 5, etc.

 

Rob

Highlighted
Master Anaplanner/Community Boss

Re: Convert month number to month (month period)

@rob_marshall  I thought of doing so but @Catheline  needs to input 1-12 numbers in a cell and system should derive months based on those numbers. If I flip it I think it gets complicated. 

Highlighted
Master Anaplanner/Community Boss

Re: Convert month number to month (month period)

@Misbah 

 

I get what you are saying, but you do a finditem() on the number to render the month, no?

Highlighted
Master Anaplanner/Community Boss

Re: Convert month number to month (month period)

@rob_marshall 

 

Ah I see what you saying!! 

Certified Master Anaplanner

Re: Convert month number to month (month period)

Hi @Catheline 

 

Your question leaves the YEAR definition open in my opinion. 

 

Other than that I guess an easy solution would be to: 

1. Transform the number into a date (i left between quotes what could be harcoded) using the DATE function as DATE("01" , input , "YYYY)

->  outcome "01"/1/"YYYY"

2. Use the period function on the date  

 

Let me know if I misunderstood anything or my answer is not clear.

 

Regards,

 

Highlighted
Occasional Contributor

Re: Convert month number to month (month period)

Hi @paolovm,

 

I like this idea!

 

It avoids having to make an additional list.

 

Thank you! 

Highlighted
Certified Master Anaplanner

Re: Convert month number to month (month period)

Hi @Catheline 

 

If that works as you'd expect appreciate if you could mark the "Accept as Solution" field so others can refer to this discussion in future.

 

🙂