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

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

From: <no.spam_at_columbus.rr.com>
Date: Fri, 11 Feb 2000 20:29:16 GMT
Message-ID: <wi_o4.9579$0d4.73825@typhoon.columbus.rr.com>


Well, there are 86400 seconds in a day and 600 seconds in 10 minutes, this will do it:

SELECT SYSDATE + 600/86400 FROM DUAL; So, in your case:

SELECT *
  FROM xxxx X
 WHERE X.dateAndTime < :(new.DateTIme - (600/86400));

Ken Sproule <kenmn_at_tds.net> 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

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Ivan Samuelson                 * 
Staff Support Coordinator and  * isamuels_at_columbus.rr.com
Information Systems Consultant *
Metro Information Services     * http://home.columbus.rr.com/isamuels

http://www.MetroIS.com         *

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Received on Fri Feb 11 2000 - 14:29:16 CST

Original text of this message

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