- Local time
- Yesterday, 16:11
- Joined
- Aug 30, 2003
- Messages
- 36,137
Perhaps I'm having a brain cramp, but I'm having trouble coming up with a query to return people who are sick or on vacation at any point during a selected date range. I've attached a demo with a sample of the table in it. The important fields are OffStartDate and OffEndDate.
I need to be able to specify a "from" and "to" date, and get any record where OffStartDate and OffEndDate overlap the selected dates. For me, it gets tricky when those dates are both outside the selected dates (start date before the from, end date after the to).
TIA
I need to be able to specify a "from" and "to" date, and get any record where OffStartDate and OffEndDate overlap the selected dates. For me, it gets tricky when those dates are both outside the selected dates (start date before the from, end date after the to).
TIA