Dates are converted to numbers by calculating the Julian date, the (integer) number of days that have elapsed since January 1, 4712 BCE. The calculation used by Oracle results in a seven-digit number (for dates most often used), such as 2449086 for 08-APR-93.
The following SQL illustrates how the conversion is performed:
TO_NUMBER(TO_CHAR( "CUSTOMERS"."CUST_EFF_FROM", 'J')) AS "CUST_EFF_FROM"
For more information about Julian dates, see the discussion of the DATE
datatype in Oracle Database Concepts.
Copyright © 2006, Oracle. All rights reserved.