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: Timestamps in Oracle, Newbie question!

Re: Timestamps in Oracle, Newbie question!

From: Pete Sharman <psharman_at_us.oracle.com>
Date: Mon, 12 Jul 1999 09:21:17 -0700
Message-ID: <378A15FC.91A2AA49@us.oracle.com>


Paolo

The equivalent datatype in Oracle is a date datatype. Dates are stored in a 7 byte format, one byte each for the century, year, month, day, hour, minute and second. Formatting the data is done by default as dd-mon-yy hh:mi:ss, but there's a lot of formats you can change this to. There is no way to store fractions of a second in the date datatype. If you need fractions of a second, then most people would store the fractions as a separate numeric column in addition to the date column.

HTH. Pete

Paolo Rossi wrote:

> Hi!
> We are trying to migrate an application from DB2 UDB 5.2 to Oracle 8
> and are encountering some problems with timestamp fields!
>
> The problem lies in the fact that in DB2 timestamp fields have a
> format like yyyymmdd-hh.mm.ss.xxxxxx which is something we have not
> been able to obtain in Oracle!
>
> Could anyone please tell me how timestamps are treated in Oracle and
> how can I format such fields in a as close as possible way to the DB2
> format, in order to maintain the application as transparent as
> possible to the DB platform in use?
>
> TIA
>
> Paolo Rossi

--
Regards

Pete


Received on Mon Jul 12 1999 - 11:21:17 CDT

Original text of this message

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