how to query using sysdate 13 hours ago [message #200860] |
Wed, 01 November 2006 12:36  |
jonathan184
Messages: 21 Registered: November 2006
|
Junior Member |
|
|
How do i query and get results like 13 hrs ago.
The query below gives 13 days, what would give me 13 hours?
select * from site s
where trim(s.lastupdateddate) = trim(sysdate-13)
order by s.lastupdateddate
If anyone could help me please reply.
|
|
|
|
Re: how to query using sysdate 13 hours ago [message #200879 is a reply to message #200860] |
Wed, 01 November 2006 14:32   |
joy_division
Messages: 4963 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
Do you mean you want records from within the last 13 hours or only 13 hours ago? If the latter is the case then there's a good chance you'll never get any records no matter when you run this as it will only get records that are exactly 13 hours ago, to the second.
There would also be no reason to use an order by clause on the column since they would all be the same.
[Updated on: Wed, 01 November 2006 14:32] Report message to a moderator
|
|
|
|
|