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 get the entries from the last 2 hours?

Re: how to get the entries from the last 2 hours?

From: Marc Billiet <first.last_at_com.hydro.switch.this>
Date: Tue, 11 Dec 2001 15:07:47 GMT
Message-ID: <20011211.15074750@y1032696.hae.hydro.com>


Op 2001-12-11, 15:42:15, schreef hippie_at_gmx.ch (Angela) over het thema how to get the entries from the last 2 hours?:

> hi all

> does somebody know how i cant get the entries from a database which
> were added in the last 2 hours?? i tried it like this:
> select * from logdata where timestamp > (SYSDATE - TO_DATE('2',
> 'HH24'))

> i also tried id without '' but it isn't working at all :((

> thanks a lot

> angela

Try this:

select *
from logdata
where timestamp > SYSDATE – 2/24

Two hours = 2 / 24 of a day.

Hope this helps,

Marc Received on Tue Dec 11 2001 - 09:07:47 CST

Original text of this message

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