Another way to see the problem is like this:
The ordered sequence of doubles is like this:
... -11, ... -10.5, ... -10, ... , -1, ... 10, ..., 1000
So, in theory, -10.5 is 'older' than -10.
BUT it is not:
? DateDiff("s", CDate(-10.5), now) > DateDiff("s", CDate(-10), now)
False
so there are less seconds between now and CDate(-10.5) than there are
between now and CDate(-10). Cdate(-10.5) is closer to now than CDate(-10).
An explanation goes like this:
in a date_time value, to the get the date, use the integer part. To get the
time, first, use the absolute value of the number, then, take the decimal
part. DateDiff knows about that way to represent date and time, but
standard arithmetic does not.
Vanderghast, Access MVP