Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to convert Oracle native Date to date time
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