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: How to add or subtract 10 minutes from a date?

Re: How to add or subtract 10 minutes from a date?

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Fri, 11 Feb 2000 20:40:17 +0800
Message-ID: <38A40331.451B@yahoo.com>


Ken Sproule wrote:
>
> Thanks in advance everyone.
>
> Assume I have a date like '12/31/99 11:59:30' and I want to add 10
> Minutes to it.
> I need to do this in s cursor select in a Before Insert Trigger that
> goes like:
> CURSOR cur is select * from xxxx X where X.dateAndTime <
> :(new.DateTime - 10 Minutes);
>
> I haven't been very successful in figuring it out. A worse date would
> be '02/28/00 11:59:30' + 10 minutes.
>
> How can I do this?
>
> Best,
>
> Ken Sproule
> kenmn_at_tds.net
>
> Ken Sproule
> kenmn_at_tds.net

1 = 1 day thus

date + 1 = same time tomorrow
sysdate + 1/2 = 12 hours from now
sysdate + 1/24 = 1 hour from now

and so forth

HTH
:-)

--



Connor McDonald
There are 3,434,679 oracle websites around the world. Now there is one more... http://www.oracledba.co.uk Received on Fri Feb 11 2000 - 06:40:17 CST

Original text of this message

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