BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I am trying to append my SAS dataset into an Oracle table, but the Oracle does not recoginze SAS date - After uploading, all date columns in my SAS dateset show up in Oracle as 1960, 1961... How do convert/specify my SAS date columns so that Oracle can recognize them?

Thanks!
3 REPLIES 3
darrylovia
Quartz | Level 8
I pull data from Oracle and push to Oracle almost on a daily basis.

Generally Oracle treats dates as datetime values in SAS speak. Download an Oracle table and you'll see all date fields with a datetime. format and informat associated with it.

I would first convert your date in the SAS data set into a SAS date time value then run your append. See the below function.

newDate=dhms(Yourdate,0,0,0);

that should work..

D
deleted_user
Not applicable
Many many thanks D! I imagined that this would be a common issue, but to my surprise I couldn't find information over Internet. It worked. Thanks again!
deleted_user
Not applicable
One more question D,

I was able to upload date column into oracle table, but when I check the values I found seemingly random time values (the date is correct), even though I used MY_DATE = dhms(MY_DATE, 0, 0, 0). Does this sound right?

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1375 views
  • 0 likes
  • 2 in conversation