I have a table having shop details where shop opening and closing time are available.
My need is to find shops that are open in a time range supplied.
Shop1 opens at 9 pm and closes next day at 4 am.
Shop2 opens at 1 pm and closes at 12 am.
Shop3 opens at 7 pm and closes at 10 pm.
Shop4 opens at 10 am and closes at 1 pm.
I have to search for shops open between 6:30 pm to 8:30 pm. The result should be Shop2 and Shop3.
Search for Shops open between 12 pm to 2 pm will return Shop2 and Shop4.
Thanx in advance.