Check the DOC and you will see that DATE9 is DDMMMYYYY format. Your code worked for me:
13 data _null_;
14 old_var = '01apr2010';
15 format new_var date9.;
16 new_var=input(old_var, DATE9.);
17 put _all_;
18 run;
old_var=01apr2010 new_var=01APR2010 _ERROR_=0 _N_=1
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.00 second
Also check the INFORMAT ANYDTDTE as well.
Scott Barry
SBBWorks, Inc.
Suggested Google advanced search argument, this topic/post:
converting dates site:sas.com
... View more