Date Query

  • Thread starter Thread starter Doug
  • Start date Start date
D

Doug

Friends,

Any help on the following is appreciated.

I have in a table [StartDate], [EndDate] and [Days] which
through a DateDiff provides the number of days between
the two dates.

My Question:

How do I query with a date selection {StartDate]and
[EndDate] that is "outside" of the date range already in
the table to return a yes or no? In other words: Oct. 10
[StartDate] through Oct. 15[EndDate], 5 [Days] and now I
want to return a query answer "no" because I entered a
new date range of Oct. 7 through Oct. 12. with the date
range overlap. Thanks.
 
If the new End Date is greater than (or equal to) any existing Start Date
and the new Start Date is less than (or equal to) the End Date associated
with that existing Start Date, you've got overlap.
 
Back
Top