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: Stephan Born <stephan.born_at_beusen.de>
Date: Thu, 06 Apr 2000 17:19:17 +0200
Message-ID: <38ECAAF5.8EFEB9A4@beusen.de>


> 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!

Look at this:

select sysdate, sysdate + 1 from dual

date + 1 will add exactely 1 day.

date + 1/24 adds one hour

date + 1/(24*60) adds one minute

date + 1/(24*60*60) adds one second

and

date + 10/(24*60) = date + 1/(24*6) adds 10 minutes

Regards, Stephan
--


Dipl.-Inf. (FH) Stephan Born   | beusen Consulting GmbH
fon: +49 30 549932-0           | Landsberger Allee 392
fax: +49 30 549932-21          | 12681 Berlin
mailto:stephan.born_at_beusen.de  | Germany
---------------------------------------------------------------
       PGP-Key verfügbar       |      PGP-Key available
---------------------------------------------------------------


Received on Thu Apr 06 2000 - 10:19:17 CDT

Original text of this message

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