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 -> Re: plsql / function / convert to date

Re: plsql / function / convert to date

From: DA Morgan <damorgan_at_exesolutions.com>
Date: Wed, 26 Feb 2003 20:26:58 -0800
Message-ID: <3E5D9392.4F8A2698@exesolutions.com>


Oliver Demus wrote:

> Hi there,
> we save in our database the date as a number e. g. 27. Feb 2003 =
> 37679.
> I donīt know the reason for that. But I have no idea, how to convert
> it back to a date in Oracle plsql. In VB you can do it with
> cdat(37679).
> Is there any possibility in Oracle?
>
> Thanks in advance
> Oliver

Impossible to tell except by experimentation. Look for a record with a known date, find the number, and then run the following query:

SELECT SYSDATE-<the number>
FROM dual;

That will likely give you the basis for the system.

Then redesign the database as this is pure nonsense guaranteed to accomplish nothing other than to slow things down and create busy work.

Daniel Morgan Received on Wed Feb 26 2003 - 22:26:58 CST

Original text of this message

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