I have a program that collects activity duration data in the form of an activity start date (and time) to it's end date (and time). For example activity A started 09/23/2002 10:48 am and ended 09/23/2002 1:21 pm.
I need to be able to construct a sql query that captures the activity durations between a specific time period (Say 09/23/2002 12am to 09/24/2002 12am) but I need to capture durations that overlap the artifical boundries (Say 09/23/2002 11pm to 09/24/2002 2am).
The database is access 2000 and I need to grab the records that fall between the startDate and endDate as well as the records that have an end or start point on or within the time period. Also, each record has two columns, startTime and endTime.
I am not even sure how to go about this. I think it would look something like this:
SELECT * FROM tableA WHERE tableA.startTime Between startDate AND endDate
SELECT * FROM tableA WHERE tableA.endTime Between startDate AND endDate
NOTE: startDate and endDate are the actual time periods to search for
Thanks.
Troy Williams E.I.T.
fenris@hotmail.com
I need to be able to construct a sql query that captures the activity durations between a specific time period (Say 09/23/2002 12am to 09/24/2002 12am) but I need to capture durations that overlap the artifical boundries (Say 09/23/2002 11pm to 09/24/2002 2am).
The database is access 2000 and I need to grab the records that fall between the startDate and endDate as well as the records that have an end or start point on or within the time period. Also, each record has two columns, startTime and endTime.
I am not even sure how to go about this. I think it would look something like this:
SELECT * FROM tableA WHERE tableA.startTime Between startDate AND endDate
SELECT * FROM tableA WHERE tableA.endTime Between startDate AND endDate
NOTE: startDate and endDate are the actual time periods to search for
Thanks.
Troy Williams E.I.T.
fenris@hotmail.com