in reply to Re: Seeing if a Time is Within a Range
in thread Seeing if a Time is Within a Range
Be sure you use the correct comparisons for the data your working with. You have four choices of what "between" means:
(time >= start and time <= end)
(time > start and time <= end)
(time >= start and time < end)
(time > start and time < end)
Make sure you use the correct comparison for your application.
E.g
01:01:00 – event 1 happened
01:59:00 – event 2 happened
02:00:00 – event 3 happened
02:01:00 – event 4 happened
02:59:00 – event 5 happened
Ask yourself: If you have one comparison from 01:00:00 to 02:00:00 and then a second comparison from 02:00:00 to 03:00:00, where do you want event 3 to show up? Both? First? Second? Neither?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Seeing if a Time is Within a Range
by pg (Canon) on Oct 26, 2004 at 21:21 UTC |