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

Home -> Community -> Usenet -> c.d.o.misc -> Re: DATE arithmetic

Re: DATE arithmetic

From: Thomas J. Kyte <tkyte_at_us.oracle.com>
Date: Wed, 05 Apr 2000 19:24:20 GMT
Message-ID: <8cg3sg$hvt$1@nnrp1.deja.com>


In article <38EB88CD.A83AAB81_at_mitre.org>,   Dennis Sandlin <dsandlin_at_mitre.org> wrote:
> Is there a way add time to a DATE field. For example:
>
> update table_a set date_field = date_field + "10 minutes"
>
> Thanks in advance!
> Dennis
>

set date_field = date_field + 10*(1/24/60)

all date math is in parts of days.

+1 = add a day
+1/24 = add an hour
+1/24/60 = add a minute
+1/24/60/60 = add a second

see http://osi.oracle.com/~tkyte/Misc/DateDiff.html for related info.

--

Thomas Kyte                              tkyte_at_us.oracle.com
Oracle Service Industries
http://osi.oracle.com/~tkyte/index.html --
Opinions are mine and do not necessarily reflect those of Oracle Corp

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Apr 05 2000 - 14:24:20 CDT

Original text of this message

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