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: 24 hours

Re: 24 hours

From: Martin Doherty <martin.doherty_at_oracle.nospam.com>
Date: Mon, 28 Oct 2002 18:10:47 -0800
Message-ID: <Sbmv9.12$9v5.380@news.oracle.com>


Yep it's simple!

WHERE datecol >= sysdate - 1

You can perform date arithmetic where the basic unit is the day. So, (sysdate - 1) means subtract 1 day (24 hours) from sysdate. Fractions represent portions of a day, e.g. 1/24 = 1 hour, 1/(24*60) = 1 minute etc.

Martin

William F. O'Neill wrote:

>Am using Oracle 8.0.4 on WINNT, and have a question about date manipulation.
>I have a requirement at work to change a retrieval criteria for a report
>from today's date to the past 24 hours; so, let's say its 10/28/2002
>15:13:22, my requirement is to get everyting entered from this date and time
>backwards for 24 hours, eg. 10/27/2002 15:13:22. Have I made myself
>clear???? Can't figure this out, and I must be 'braindead' from thinking
>about for so long. The answer is probably very simple! HELP! and thank
>you.
>
>
>
>
Received on Mon Oct 28 2002 - 20:10:47 CST

Original text of this message

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