I tried to solve this in Excel, but I didn't have much luck, so I'm going to try with Access which is probably better anyway.
Using Access 2007, I have the following tblEvents:
ID SiteNo EventNo EventStart EventEnd EventDesc
1 1 1 1/1/2011 1/5/2011 a
2 1 2 1/11/2011 1/15/2011 b
3 2 1 1/9/2011 1/10/2011 c
4 2 2 1/14/2011 1/17/2011 d
5 3 1 1/13/2011 1/16/2011 e
6 3 2 1/18/2011 1/21/2011 f
I would like to find the dates of concurrent events, i.e. the dates when there are events happening at all three sites simultaneously.
In this example, it would be 1/14 - 1/15/2011.
I've tried various forms of the following without success.
It just gives me all the events.
Thanks,
Brian
Using Access 2007, I have the following tblEvents:
ID SiteNo EventNo EventStart EventEnd EventDesc
1 1 1 1/1/2011 1/5/2011 a
2 1 2 1/11/2011 1/15/2011 b
3 2 1 1/9/2011 1/10/2011 c
4 2 2 1/14/2011 1/17/2011 d
5 3 1 1/13/2011 1/16/2011 e
6 3 2 1/18/2011 1/21/2011 f
I would like to find the dates of concurrent events, i.e. the dates when there are events happening at all three sites simultaneously.
In this example, it would be 1/14 - 1/15/2011.
I've tried various forms of the following without success.
Code:
SELECT tblEvents.SiteNo, tblEvents.EventNo, tblEvents.EventStart, tblEvents.EventEnd, tblEvents.[EventStart]
FROM tblEvents
WHERE (((tblEvents.[EventStart]) Between [EventStart] And nz([EventEnd],[EventStart])));
It just gives me all the events.
Thanks,
Brian