Selecting time interval
655778Dec 4 2008 — edited Dec 4 2008Hallo,
I have a DATE column and from this I need to select time intervals – precisely from 18:00 evening to next-day-morning 08:00 (that is from 18:00PM to 08:00AM).
I’m trying this:
SELECT DATE
FROM Table
WHERE TO_CHAR(DATE,’HH24:MI’) Between ‘08:00’ And ’18:00’
But I do not get the right records selected, it is as if I am unable to get past 00:00 mark into the next day.
Could anybody help me with this probably trivial problem?
Best regards from SQLNovice.