You need to sign in to do that

Don't have an account?

Seraph

# N>Change field Month Key (201503 to "March 2015") in object record

Is it possible to change

ex.

201503 => March 2015

201401 => January 2014

I need it for REPORTS (

THX...

**Month Key field**value to**month year**format?ex.

201503 => March 2015

201401 => January 2014

I need it for REPORTS (

**x-axis**) because**201401**format doesn't look good but I don't know if it can be changed and how to do it?THX...

sandeep sankhlaHi,

Follow the steps:

1. Create one formula field on same object .....

2. Substring it for last 2 digits then you will get 04 or whatever ..

3. check if it is 01 assign jan, if 02 assign feb , if 03 assign march lik ethis chcek for all 12 months and get the string

4. from step 2 you got 2 values one is 2015 and then 2 digits...

5. from step 3 you will get the month name then just + 2015

6. so finally your formula will return you the date like

if it is 201503 then it will show March 2015

then in reports you use new formula field which is having proper value..

Thanks,

Sandeep

## All Answers

sandeep sankhlaHi Seraph,

Yes we can achieve this...you can create one more field which you will update with proper format...you can use substring and check if last 2 digits are 01, 02 and 03 or so on then you can identify the month and then rest will be the year....

You can create one formula field and do these things...

thanks,

Sandeep

Seraph@sandeep I haven't tried using formulas and I read some of the formula functions but I can't find what to use for substring

I just wanted to replace those bottom values to Month Year

201503 => March 2015sandeep sankhlaHi,

Follow the steps:

1. Create one formula field on same object .....

2. Substring it for last 2 digits then you will get 04 or whatever ..

3. check if it is 01 assign jan, if 02 assign feb , if 03 assign march lik ethis chcek for all 12 months and get the string

4. from step 2 you got 2 values one is 2015 and then 2 digits...

5. from step 3 you will get the month name then just + 2015

6. so finally your formula will return you the date like

if it is 201503 then it will show March 2015

then in reports you use new formula field which is having proper value..

Thanks,

Sandeep

SeraphThx

sandeepfor simplifying your previous explanation...whatformula return typedo I use?Date,Number, or Textsandeep sankhlaYou can use text as this will be text only.... Seraph@sandeep..I was able to get the correct result I wanted

201503 => March 2015with this formula field code I madeCASE(TEXT(MID(Month_Key__c , 5, 2)),

1, "January " + (MID(Month_Key__c , 1, 4)),

2, "February " + (MID(Month_Key__c , 1, 4)),

3, "March " + (MID(Month_Key__c , 1, 4)),

4, "April " + (MID(Month_Key__c , 1, 4)),

5, "May " + (MID(Month_Key__c , 1, 4)),

6, "June " + (MID(Month_Key__c , 1, 4)),

7, "July " + (MID(Month_Key__c , 1, 4)),

8, "August " + (MID(Month_Key__c , 1, 4)),

9, "September " + (MID(Month_Key__c , 1, 4)),

10, "October " + (MID(Month_Key__c , 1, 4)),

11, "November " + (MID(Month_Key__c , 1, 4)),

12, "December " + (MID(Month_Key__c , 1, 4)),

"None")

The problem is it shows wrongly on report since it lists the Months in alphabetical order...zzz

sandeep sankhlaHi,

Then if you need to show these with order by years then you split like

201503 => March 2015 instead of these you do ==>2015 March

Seraph@sandeep I think you misunderstood..I want it sorted in months like its original which was automatically sorted because those were originally numbers.

ex

before:

x-axis201503 - 201504 - 201505I need it like

March 2015 - April 2015 - May 2015sandeep sankhlaHi,

You can then concatenate like this

201503 - --------03-March 2015

then only it will get sort based on the number..

SeraphI only wish to show it as Month Year...thx so much anyway@sandeepI was able to start learning about formulas because of these..