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