Comparing date ranges

R

Ralph

How do I compare two date ranges for potential conflicts? For instance date
range 1 has a begin date of 3/1/09 and and end date of 3/15/09 and date
range 2 has a begin date of 3/10/09 and end date of 4/1/09. Date range 1 and
date range 2 have a conflict. help?
 
A

Allen Browne

The core logic is that 2 events overlap if both:
- A begins before B ends, and
- B begins before A ends.

You will see that this is true if you draw timelines representing the
events:
------
---------------
------
-----------

Details in:
Clashing Events/Appointments
at:
http://allenbrowne.com/appevent.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top