Thomas:

I'm a SAS guy who must pull Oracle data from the back-end DB.

SAS stores dates internally as elapsed days since Jan 1, 1960.  If I request
an Oracle date field, SAS creates a datetime variable, number of seconds
since midnight Jan 1, 1960.  Rather than use SAS functions to extract the
date ( e.g. datepart function ), I'd like to push that back to Oracle if
possible and create a simple date field on SAS.  I can accomplish the
desired effect with:

  select date_fld - to_date('01Jan1960','ddmonyyyy') as sas_date

but I was hoping there was an Oracle function to surface the internal value
( appears to be days since Jan 1, 1968 ).  Presumably such a function would
be more efficient.

Thanks for your help.

-----Original Message-----
Sent: January 23, 2004 2:50 PM
To: Multiple recipients of list ORACLE-L


Harry,

Can you explain why you need to raw internal value?  Just curious.

Tom Mercadante
Oracle Certified Professional


-----Original Message-----
Sent: Friday, January 23, 2004 1:40 PM
To: Multiple recipients of list ORACLE-L


You gather it wrong :)
Oracle stores date in 8 bytes, one for each: year, month, day, hour,
min, ... etc.

Igor Neyman, OCP DBA
[EMAIL PROTECTED]



-----Original Message-----
Droogendyk, Harry
Sent: Friday, January 23, 2004 12:40 PM
To: Multiple recipients of list ORACLE-L

Folks:

>From what I gather, Oracle stores dates as the number of elapsed days
since
Jan 1, 1968.  When I query a column of type 'DATE', it returns me the
default format, dd-mon-yy.  I know I can use
to_char(date_col,'YYYYMMDD')
etc... to define many output formats.

What can I do to get the raw internal value of the date?  i.e. today is
13172.

Thanks. 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Droogendyk, Harry
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Igor Neyman
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Mercadante, Thomas F
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Droogendyk, Harry
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to