cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
Herrera5238
Level III

Col Formula Month()

I have a data table where I have multiple date with times. I'm trying to change all the dates into just the month and maybe even a month-year format.

I know I've done this before by selecting the column going to formula and putting together Month(DateandTime) than I would use recode to change numbers into Jan. - Dec.

 

When I'm trying today, the Month() formula is changing my date to just dots. I've looked at other posts and the formula is what I'm suppose to be using. I'm not sure why I'm not getting my expected result?

13 REPLIES 13
txnelson
Super User

Re: Col Formula Month()

If(:month <= 2 | :month >=12, 
     season="Winter",
     :month <=5, season="Spring",
     :month <=8, season="Summer",
     season="Fall"
); 
Jim
Saroash
Level I

Re: Col Formula Month()

Hello All, 

 

I am able to use a lot of help provided on this forum. I am looking for some help with attached table. Column 2 has months from year 2019 and 2020. I need to add year next to month.

txnelson
Super User

Re: Col Formula Month()

Here is a formula that will work

Substr( Format( :Date, "Monddyyyy" ), 1, 3 ) || " " || Char( Year( :Date ) )
Jim
Saroash
Level I

Re: Col Formula Month()

Million thanks :)