limiting records to yesterday 8pm data

I need to limit query to return records between yesterday 8 pm and day before yesterday 8pm


Ie select * from xyz where mydate between trunc(sysdate)_2  + 20hrs and sysdate _ 1 + 20 hrs
Please let me know how to do this..

Thanks
gs79Asked:
Who is Participating?
 
sdstuberConnect With a Mentor Commented:
select * from xyz
where mydate between trunc(sysdate) - 2 + 20/24 and trunc(sysdate) - 1 + 20/24
0
 
slightwv (䄆 Netminder)Connect With a Mentor Commented:
Try:

select * from xyz where mydate between trunc(sysdate-1) + 20/24 and trunc(sysdate) + 20/24
0
 
slightwv (䄆 Netminder) Commented:
I was off by a day and sdstuber beat me to it...  his is correct.
0
 
gs79Author Commented:
Spot on!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.