Determine Whether Two Date Ranges Overlap
Asked 07 September, 2021
Viewed 436 times
  • 56
Votes

Given two date ranges, what is the simplest or most efficient way to determine whether the two date ranges overlap?

As an example, suppose we have ranges denoted by DateTime variables StartDate1 to EndDate1 and StartDate2 to EndDate2.

30 Answer