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: Millisecs in Oracle

Re: Millisecs in Oracle

From: Robert Klemme <bob.news_at_gmx.net>
Date: Fri, 24 Mar 2006 10:34:04 +0100
Message-ID: <48hsocFjj6npU1@individual.net>


paulspratley_at_yahoo.co.uk wrote:
> Hi All,
>
> How do I add one millisec to a date in Oracle?
>
>
> CREATE TABLE [dbo].[script] (
> [scriptid] numeric(20,0) NOT NULL,
> [creationdate] datetime NOT NULL,
> CONSTRAINT [PK_script] PRIMARY KEY([scriptid])
> )
> GO
>
> INSERT INTO script(scriptid, creationdate)
> VALUES(0, to_date('20060321 12:00:00', 'YYYYMMDD HH:MI:SI')
>
> select creationdate, creationdate + (1/(24*60*60)), creationdate +
> (1/(24*60*60*1000)) from script
>
> The second column adds a second to the creation date and the third
> column should a one millisec to the creation date but it does not seem
> to work.
>
> CREATIONDATE CREATIONDATE+((1/(24*60*60)))
> CREATIONDATE+((1/(24*60*60*1000)))
> ----------------- --------------------------------
> -------------------------------------
> 060321120000+0000 060321120001+0000 060321120000+0000
>
> 060321120000+0000 060321120001+0000 060321120000+0000
>
>
> What am I doing wrong?
> As I'm using Aqua Studio could it be a display setting?
>

OracleŽ Database Concepts, Native Datatypes

"The DATE datatype stores point-in-time values (dates and times) in a table. The DATE datatype stores the year (including the century), the month, the day, the hours, the minutes, and the seconds (after midnight)."

        robert Received on Fri Mar 24 2006 - 03:34:04 CST

Original text of this message

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