BookmarkSubscribeRSS Feed
Ram4sas
Fluorite | Level 6

Hi All,

 

I have difined oracle DB in SAS SMC and register the tables too.

 

The table has birth_dt column as DATE Format(data like 20APR1990) when i see the same column in SAS SMC and EG, been converted as DATETIME20.0(data shows like 20APR1990:00:00:00).

 

Users dont want apply any code on SAS dataset to extract date like datepart functions.

 

how to restrict 'birth_dt' column to register in SAS Metadata as in Oracle DB(DATE9. format) and stop converting to DATETIME20. format?

 

 

 

Thank you,

CG

1 REPLY 1
SASKiwi
PROC Star

What you are seeing is the default translation of Oracle data types to SAS ones as documented here:

 

http://support.sas.com/documentation/cdl/en/acreldb/69580/HTML/default/viewer.htm#p06jk0u30uhuj5n18f...

 

The Oracle data type DATE, also includes times.

 

Try the SASDATEFMT option for overriding the default translation:

 

data test;
  set OraLib.OraTable (sasdatefmt = (dates = 'date9.'));
run;

 

 

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1069 views
  • 0 likes
  • 2 in conversation