data want;
set test;
length Month $3;
if DateOfService ne . then do;
Month=substr(put(DateOfService,date9.),3,3); /* result is like FEB */
Month=propcase(substr(put(DateOfService,date9.),3,3));/* result is like Feb select as you like */
end;
run;
Hello team member,
First solution: dates are like 03/12/2021, it is not text. All months as character have 3 characters. How does SAS distinguish this?
I think your second solution is the answer. Let me test it and get back to you.
What would be the syntax if I want to write in process sql? Refering to dates in datelines, thanks for clarification,
I am so thankful,
Blue&white
... View more