Date Problem


K

kt2902

I have a table that contains the StartDate and EndDate for an employees leave
due to workplace injuries. What I need to do is filter the records for a
range of dates (eg. 1/1/2009 - 31/1/2009). I run into problems when the
employee doesn't fit exactly between these dates (eg. he was absent from
27/12/08 - 5/1/09). Even though five days is actually within the range
specified, my filter won't find the record. Is there a way around this or am
I asking too much of Access?

Thanks
Katie
 
Ad

Advertisements

A

Allen Browne

The logic to find overlapping dates is:
A starts before B ends, AND
B starts before A ends.

You can craft your criteria to match that.
 
Ad

Advertisements


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