Results 1 to 2 of 2
Thread: between times (xp/2k)
2006-06-29, 04:21 #1
- Join Date
- Nov 2001
- Jerusalem, Israel
- Thanked 1 Time in 1 Post
between times (xp/2k)
I remember a discussion here about finding overlaps of time.
i.e. - If I have a schedule of classes that start and end at random times, not all on a specific part of the hour, and I want to know all classes going on between two other random times. I hope that is clear.
Am I remembering correctly, because I could not find it, and if it was not discussed, does anyone have any ideas, before I try to reinvent the wheel?
2006-06-29, 05:29 #2
- Join Date
- Mar 2002
- Thanked 30 Times in 30 Posts
Re: between times (xp/2k)
Similar problems have been discussed several times.
Say that the schedule has fields ClassStart and ClassEnd, and you want to know classes that overlap with the time period from TimeStart to TimeEnd (these could be parameters, or references to text boxes on a form).
Set the criteria for the ClassStart field to <=[TimeEnd] and the criteria for ClassEnd to >=[TimeStart]
(The above may be mangled, it's supposed to read "less than or equal to TimeEnd" and "greater than or equal to TineStart")