Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: 24 hours
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
![]() |
![]() |