Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Internal date format (numerical)
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