Hi @AMMAN
Actually the dates in your attachment aren't formatted as date9 but as mmddyy9 but the same solution should work either way. You can use a put statement with the monnmae format as shown below (I've used the first three records from your attachment
data have;
infile datalines dlm=",";
length name $5 bday 8;
informat bday mmddyy9.;
format bday mmddyy9.;
input name bday;
datalines;
Chas,5/15/1986
Pearl,3/6/1997
Troy,3/26/1999
;
run;
data want;
set have;
justmonth=substr(strip(put(bday, monname.)),1,3);
run;
... View more