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
Igor
Sorry but Oracle uses 7 bytes for a date
century (1 byte)
year (1 byte)
month (1 byte)
day (1 byte)
hour (1 byte)
minute (1 byte)
second (1 byte)
SQL desc d
Name Null?Type
-
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
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
Harry
This list is moving to freelists, but I'll assume you knew that.
Actually the base value for the standard Oracle dates is Jan 1, 4712 BC.
There is a Julian function that will return the number of days since the
base. To return the Julian,
select to_char(sysdate,'J') from dual;
Also,
Oops...
Igor Neyman, OCP DBA
[EMAIL PROTECTED]
-Original Message-
Peter Gram
Sent: Friday, January 23, 2004 2:54 PM
To: Multiple recipients of list ORACLE-L
Igor
Sorry but Oracle uses 7 bytes for a date
century (1 byte)
year (1 byte)
month (1 byte)
day (1 byte)
hour (1 byte)
minute
Thomas:
I'm aware of the to_char function and the various options. However as you
alluded to, that lands in SAS as a character literal, e.g. '22/01/2004'
requiring me to convert it to internal format before I can use it in SAS.
I think I have to use my work around:
select date_fld -
Thanks to all who replied with helpful comments, pointers, links etc...
-Original Message-
Sent: January 23, 2004 3:24 PM
To: Multiple recipients of list ORACLE-L
Harry
This list is moving to freelists, but I'll assume you knew that.
Actually the base value for the standard Oracle
Tom Mercadante
Oracle Certified Professional
-Original Message-
Sent: Friday, January 23, 2004 3:09 PM
To: Multiple recipients of list ORACLE-L
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
Harry,
Look at the to_char function in Oracle. It will convert a date field to
*any* format you want.
for example:
select to_char(date_field,'mm/dd/ hh24miss') will return a date in the
format as noted. You have about as many options as you probably need. You
can combine as many format
10 matches
Mail list logo