05-09-2014 11:33 AM
is there a way to assosciate numbers from 1 to 12 with the 12 months without having to down the long-winded road of
if x = 1 then my_month = 'JAN';
else if x=2 then my_month = 'FEB';
else if x=12 then my_month = 'DEC'
05-09-2014 11:41 AM
One way of many is to code a proc format that contains the values.
For example (untested):
1 = "JAN"
2 = "FEB"
other = "err" /* in case you have a number greater than 12, missing or zero */
my_month = put(x,myname.);
Need further help from the community? Please ask a new question.