I am trying to export data from a SAS dataset to an Access database and I'm having trouble getting the date to export correctly. The date that's getting to my Access table is 1/1/1960 which I know is SAS's starting point for storing dates. Here is the test code I've been using. What am I doing wrong?
libname JobLib odbc dsn=JobStats;
DATA CUSTOMER;
INPUT @1 CUSTOMER 3.
@5 JobNum $3.
@17 reccnt 5.
@23 ProcCnt 2.
@26 jobtype $5.;
procdate=today();
format procdate date8.;
cards;
123 780 00045 01 EVAL
456 790 00135 01 EVAL
;
proc sql;
insert into joblib.jobstat(customernumber, jobnumber,processdate, recordcount, processingcount, jobtype)
(select customer, jobnum,datepart(procdate), reccnt, proccnt, jobtype from customer);
quit;
run;
libname JobLib odbc dsn=JobStats;
DATA CUSTOMER;
INPUT @1 CUSTOMER 3.
@5 JobNum $3.
@17 reccnt 5.
@23 ProcCnt 2.
@26 jobtype $5.;
procdate=today();
format procdate date8.;
cards;
123 780 00045 01 EVAL
456 790 00135 01 EVAL
;
proc sql;
insert into joblib.jobstat(customernumber, jobnumber,processdate, recordcount, processingcount, jobtype)
(select customer, jobnum,datepart(procdate), reccnt, proccnt, jobtype from customer);
quit;
run;