View Single Post
  #4  
Old June 6th, 2010, 03:42 AM posted to microsoft.public.access.queries
Marshall Barton
external usenet poster
 
Posts: 5,361
Default date and time query

domaze wrote:

Date/Time values are internally represented as Doubles with
the fractional part being the part of a day. It appears
that your end time value is a very small fraction (eg.
.00000000000001) greater than #13:00:00#. I don't think I
have ever seen that happen with a pure time value, but it is
not unusual if you ever do any arithmetic on it or the time
value comes from some other program or database.

FYI, your date_math value is not correct. In this case
Access corrected it for you, but if you used a date like
#9/5/2008# the date would be 5 Sept 2008. When you use #
around a date, it must be in an unambiguous style or in USA
style #mm/dd/yyyy#. To avoid that kind of confusion, I
usually use #yyyy-mm-dd#


Thank you very much for the reply.
I can see what you are suggesting with date but the date is not the problem.
although you are right about the date strings I usually overcome situations
like this by using format function. My painfull problem is Time. Time is
added ONLY in the form with a bound form and I certainly never do any
arithmetic in the time value. That's the "bug" I guess... That is why i'm
going crazy...



I tried every way I can think of to reproduce (A2003) it and
could not get that effect. I don't know of anything that I
can add to what I said earlier.

maybe you can use the Immediate window to triple check the
value in the form text box. See if you get the same ouput
from these two lines:

?CDbl(Forms!yourform.thetextbox)
and
?CDbl(#13:00:00#)

--
Marsh
MVP [MS Access]