Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Internal date format (numerical)

Internal date format (numerical)

From: Guy <guhar1_at_yahoo.com>
Date: 30 Nov 2005 08:54:08 -0800
Message-ID: <1133369648.634627.260420@g14g2000cwa.googlegroups.com>


Why to I need to add the number 2 to the following SQL to get the real numerical equivalent of a date?

select 2 + (to_date('01-12-2005', 'DD-MM-YYYY') - to_date('01-01-1900','DD-MM-YYYY')) from dual

I use a Delphi function EncodeDate(2005, 12, 1) which returns 38687. If I dont add 2 to the sql, I dont get the proper numerical value.

The same function works fine with Sql*Server. Received on Wed Nov 30 2005 - 10:54:08 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US