Hi everyone! I wanted to create season variable from months but I get error or I just have Winter or Fall: I'd appreciate if you'd help me ... Thanks! data a.hospital1; set a.hospital; length Season $10; if Month in ('March','April','May') then Season='Spring'; else if Month in ('June','July','August') then Season='Summer'; else if Month in ('September','October','November') then Season='Fall'; else Season='Winter'; run; I've tried this one too: data a.hospital1; set a.hospital; length Season $10; if (month='January') then season='Winter'; else if (month='February') then season='Winter'; else if (month='March') then season='Winter'; else if (month='April') then season='Spring'; else if (month='May') then season='Spring'; else if (month='June') then season='Spring'; else if (month='July') then season='Summer'; else if (month='August') then season='Summer'; else if (month='September') then season='Summer'; else if (month='October') then season='Fall'; else if (month='November') then season='Fall'; else season='Fall'; run;
... View more