Trouble with Time

  • Thread starter Thread starter akidner
  • Start date Start date
A

akidner

Why is 12:00:00 > 12:00:00?

Twelve noon is held in two variables one declared as a date and the other is
also declared as a date within a user defined type and stored in an array.

datIntervalFinish > BookingsArray(lngConCur, lngConSec).StartTime

One is grater than the other when I would expect them to be equal!
Access 2003 (11.6566.8036) SP2
Any suggestions would be most welcome.
 
akidner said:
Why is 12:00:00 > 12:00:00?

Twelve noon is held in two variables one declared as a date and the other
is
also declared as a date within a user defined type and stored in an array.

datIntervalFinish > BookingsArray(lngConCur, lngConSec).StartTime

One is grater than the other when I would expect them to be equal!
Access 2003 (11.6566.8036) SP2
Any suggestions would be most welcome.


Have you verified that one is not 12:00 AM and the other 12:00 PM? Could it
be that one contains a non-zero date portion, but you aren't displaying the
date? Or maybe one is just a tiny amount greater than the other, but less
than the displayable 1/00 of a second.

Try displaying the raw value of each:

Debug.Print _
CDbl(datIntervalFinish), _
CDbl(BookingsArray(lngConCur, lngConSec).StartTime)

That should let you see what the difference is.
 
Back
Top