I have a requirement where i need to insert todays date from a dataset variable into the oracle table column(Date type). For inserting todays date into the sas dataset column, i am using today() function.
Consider a example:
format load_date mmddyy10.;
consider a table is already present in the oracle having a column load_date (DATE type).
Now i am inserting todays date using the following:
insert into Oracle.DATE (load_date) select (load_date) from SAS.DATA_DATE;
This is running fine but the load_date in oracle table is showing 1/1/1960 instead to todays date. Please help.
You want to check the validity of your SAS variable containing the date - a value of 1/1/1960 indicates a SAS numeric internal value of zero rather than the current date which is the number of days since 1/1/1960.