Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I have a month column called " Monthname" , it has value as "January, Feb,March,April......".
I want to change the value to instead of January, how to convert it to "01" ?
rgds,
Jim
Depends on your format - do you have "January", full month name or "Feb", 3 character name, or both?
For full name:
=Num(Month(Date#('February', 'MMMM')), '00')
For abbrev name
=Num(Month(Date#('Feb', 'MMM')), '00')
Replace the literal month names with the relevant field name, like:
=Num(Month(Date#([Month_Name], 'MMMM')), '00')
Hi,
Not sure if there is a function to do this, but you could achieve with an if statement.
Something like is If(Month='Janurary', 01 ....
Or create an in line table and use the apply map function to change it over.
Mark
Depends on your format - do you have "January", full month name or "Feb", 3 character name, or both?
For full name:
=Num(Month(Date#('February', 'MMMM')), '00')
For abbrev name
=Num(Month(Date#('Feb', 'MMM')), '00')
Replace the literal month names with the relevant field name, like:
=Num(Month(Date#([Month_Name], 'MMMM')), '00')
Hi Jonathan,
i have full month name - January.
Rgds,
Jim
Assuming all the month values in full (February rather than 'Feb'), you can try like:
Num(Month(Date#(Monthname, 'MMMM'))) as MonthNum
Hello Jonathan,
what is the 00 for?
Rgds,
Jim
Hi Jim,
Try like this:
=Num(Month(Date#(Monthname, 'MMMM')), '00')
Regards
KC
my bad.. my date value format is MMMM, example: January, February, March, April, May.......
MonthName value, sorry.
>>what is the 00 for?
So that you get '01', '02', ...., '12' as per your original request. Otherwise you will get '1', '2', ..., '12'