More than two years later, this fixed my problem.. no matter what I was doing the date was coming out 1/1/1960. SAS 9.1.3 (yes, still) and Oracle 11g. Thanks for posting!
Hi bentleyj1,
still i am facing that issue.While loading from flat file to oracle database,i am getting the date column as 01-Jan-1960.
How to overcome tis issue.?I am using SAS DI 4.21
Pls help
Are you using the OLEDB or Oracle client to connect to Oracle?
I worked for a company that refused to purchase the Oracle client and we were forced to use OLEDB instead. It did some really strange things with dates that took quite a bit of work and research to get around. It might be worth investigating this further.
Regards,
Scott
Scott,
I am using Oracle client.....Is ther any way to do this?
Can you please provide a sample of the code you are using and the log output?
How have you defined the data in the flat file?
Bailey,
I hv defined the column as character datatype(not numeric).
dhms(date_column,0,0,0) is working fine......
Thanks to all of you for ur support.
Thanks DBaily for the exp.
I am not using DI studio so cannot comment on your particular issue other than to say perhaps you need to use a code window. The code provided by DBaily on March 31st, 2011 solved my problem.
is it possible to alter the default in SAS/ACCESS, like date <--> datetime
I suggest you try writing out to the flat file for loading into Oracle, dates in the form dd-mon-yyyy (01-Jan-2013). This, I believe, is one of the date formats that Oracle should handle automatically, assuming it is being loaded into a date column.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.