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

Home -> Community -> Usenet -> c.d.o.server -> Re: How to convert Oracle native Date to date time

Re: How to convert Oracle native Date to date time

From: hpuxrac <johnbhurley_at_sbcglobal.net>
Date: 3 May 2007 06:06:25 -0700
Message-ID: <1178197585.936585.76510@e65g2000hsc.googlegroups.com>


On May 3, 8:55 am, tracy <usatr..._at_hotmail.com> wrote:
> I get numbers like 1178002042 instead of date time info when I run
> access againt oracle.
>
> Does anyone know what the math is to convert this to date time, I
> assume it is telling me the number of seconds past some arbirtrary
> point in time like midnight 1-1-1980 ?
>
> Does anyone know what this arbitrary point in time is, if so I can
> work with the date time info as delivered via my current connection
> and applications.
>
> Thanks

Probably would be handy if you did an oracle describe on the table(s) you are going after. ( Are they date columns, timestamp columns etc ? ).

You can use the to_char sql function in a select statement to format oracle date datatype into strings.

Each database product ( oracle, db2, microsoft ones , etc ) has it's own set of datatypes. There's not going to necessarily be a straight mapping between the native datatypes. That's when you need to force some kind of conversion at times using functions like to_char ... Received on Thu May 03 2007 - 08:06:25 CDT

Original text of this message

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