Checking if sysdate between two times
566215Mar 9 2007 — edited Mar 9 2007Hi,
I have a table pr_blocks with the following fields:
start_time DATE
end_time DATE
I have a procedure getCurrentBlocks which returns the records where the systemdate is between start_time and end_time.
I'm having problems because the inserts on the fields are like this
to_date('10:00',hh24:mi') and the system date is of a different format.
When comparing the dates, I get no records because the month/day/year is checked, while only the time of SYSDATE needs to be checked.
I never use the day/month/year of the fields, so if the solution lays in changing the type of the fields to TIMESTAMP, it's okay. But still, i need a working where-clause, for I don't know how to do this.
Thanks in advance
Joeri