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: Relative times

Re: Relative times

From: Ban Spam <ban-spam_at_operamail.com>
Date: Sat, 10 Nov 2001 14:42:22 GMT
Message-ID: <Xns91554437B2C46SunnySD@24.0.3.73>


carolek_at_ix.netcom.com (Carole Kaufman) wrote in news:72330e0d.0111091807.55cc5700_at_posting.google.com:

> I would like to create a query in Oracle which checks data for the
> last 4 hours. In Oracle, I know that if I want a relative day, I'd
> say "Sysdate - 1". But how do I make it go to hours? When I try
> 'sysdate - 0.17', the query takes forever to run - but it runs well
> with whole numbers. We're on Oracle 7.3.
>
> Any and all help appreciated.

SYSDATE-(1/24) = 1 hour before now.
SYSDATE-(4/24) = 4 hours before now.

HTH & YMMV! Received on Sat Nov 10 2001 - 08:42:22 CST

Original text of this message

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