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

Home -> Community -> Usenet -> c.d.o.tools -> Re: How to add seconds to a date field?

Re: How to add seconds to a date field?

From: Mark Wagoner <mwagoner_at_iac.net>
Date: Fri, 2 Feb 2001 15:34:58 -0500
Message-ID: <95f5lj$ppl$1@genma.iac.net>

An Oracle date is only down to the whole second, so you cannot store milliseconds in the date field. You would have to convert the date to some form of Julian value and store it as a number.

To add 20 seconds to an existing date, you just do the math. 1 second is 1 / (24 * 60 * 60) = .0000115 To add 20 seconds, you add .0000115 * 20.

<anooshak_at_my-deja.com> wrote in message news:95f4er$iru$1_at_nnrp1.deja.com...
> Inside my stored procedure I like to get a column of type date and add
> 20 seconds to it. Any suggestions?
> Also could I get miliseconds in a date data type?
>
> Anoosh
>
>
> Sent via Deja.com
> http://www.deja.com/
Received on Fri Feb 02 2001 - 14:34:58 CST

Original text of this message

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