I would like to know if there is any way to determine if a range of dates overlaps another range of dates. For instance:
Events occur over a matter of days.
I would like to be able to search for all events that were occuring within a certain time period.
Event 1: 03/38/04 - 03/30/04
Event 2: 01/02/04 - 02/15/04
Event 3: 02/05/04 - 03/19/04
Search for events occuring between 02/01/04 and 04/01/04 would return all events.
Search for events occuring between 01/20/04 and 03/20/04 would return Events 2 & 3.
I thought about checking to see if the first date was between each events dates and then checking the end date between event dates but that will exclude events which begin and end inside of the date range. Is there any way to do this without checking to see if each individual day in a date range is within the other date ranges?
Thanks,
Tom
Events occur over a matter of days.
I would like to be able to search for all events that were occuring within a certain time period.
Event 1: 03/38/04 - 03/30/04
Event 2: 01/02/04 - 02/15/04
Event 3: 02/05/04 - 03/19/04
Search for events occuring between 02/01/04 and 04/01/04 would return all events.
Search for events occuring between 01/20/04 and 03/20/04 would return Events 2 & 3.
I thought about checking to see if the first date was between each events dates and then checking the end date between event dates but that will exclude events which begin and end inside of the date range. Is there any way to do this without checking to see if each individual day in a date range is within the other date ranges?
Thanks,
Tom