oraclesassql-insertproc-sql

Inserting the SAS date value (mmddyy10.) to Oracle table


I have a requirement where i need to insert date(mmddyy10.) from a dataset into the oracle table column(Date type). After executing the proc sql insert as shown below date inserted in oracle table are showing as '01/Jan/1960' Sample : oracle table : Test column : close_date date type : date

SAS data set: Test1 column : close_date data type: mmddyy10.

    proc sql;
    insert into test (close_date) select close_date from test1;
    quit;

Please let me know how to handle this issue


Solution

  • Try inserting datetime corresponding to your date

    ... DHMS(closedate,0,0,0) ...
    

    Although 01-jan-1960 is also the date of SAS date epoch (i.e. a SAS date is a number. Then number of days since 01-jan-1960). So, you might have a 0 in your data set.