Data defines the model by dint of genetic programming, producing the best decile table.

Creating a Numeric Date (mmddyy) to a SAS Date
Bruce Ratner, Ph.D.


num_DATE-to-SAS_DATE

data test;
input numeric_DATE 8.;
cards;
81298
8298
122246
20201
;
run;

data test;
set test;

char_DATE=put(numeric_DATE,z6.);

mon=substr(char_DATE,1,2);
dd  = substr(char_DATE,3,2);
yrs_=substr(char_DATE,5,2);

if substr(char_DATE,1,2) eq "00" then mon=substr(char_DATE,2,2) ;
if substr(char_DATE,1,2) eq "00" then dd ="0"||substr(char_DATE,4,1) ;

format DATE_sas mmddyy10.;
DATE_sas=mdy(mon,dd,yrs);
run;

proc print;
run;


For more information about this article, call Bruce Ratner at 516.791.3544 or 1 800 DM STAT-1; or e-mail at br@dmstat1.com.
Sign-up for a free GenIQ webcast: Click here.