Date Query

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.
 
D

Douglas J. Steele

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.
 

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