I have a sql procedure that needs to check for any overlaps between 2 time ranges. ie if u look at the form attached. You will see that the START time options START_HOUR and START_MINUTE
and the END time option is END_HOUR and END_MINUTE.
now for illustration purpose, let me assume that the START_HOUR parameter that is sent to the SQL stored procedure is 8 and START_MINUTE is 1 (for 00) . Similarly the END_HOUR is 9 and END_MINUTE is 1(for 00). So the time range is 8:00 - 9:00
Now i want to check if any time range choosen falls in this range.(ie in between 8:00 and 9:00)
This can happen to any list choosen. Hence if the user choose the Input form and enter 8:15 - 9:00, the store procedure should tell me that a overlap has occured.
How do i handle such situation and check for overlaps.