Checking for dates between to values
Posted: Sat Jul 19, 2003 9:42 pm
I am working on a calendar project and I am a stuck. I have a table where there are two datetime columns for time start and time end. The problem I am have is querying those columns to check that dates I am about to add do not conflict with existing dates.
for instance:
I may have a row with a time_start = 2003-07-21 08:00:00
and time_end = 2003-07-22 11:30:00
I now want to do a query to check if new_time_start = 2003-07-22 06:00:00 and new_time_end = 2003-07-22 12:30:00 conflicts with the above row
I have been ages trying to get this to work with no joy. Knowing my luck it's something simple, but I will appreciate the help anyway.
for instance:
I may have a row with a time_start = 2003-07-21 08:00:00
and time_end = 2003-07-22 11:30:00
I now want to do a query to check if new_time_start = 2003-07-22 06:00:00 and new_time_end = 2003-07-22 12:30:00 conflicts with the above row
I have been ages trying to get this to work with no joy. Knowing my luck it's something simple, but I will appreciate the help anyway.