DateTime problem

P

Phill

I am having a problem with storing the datetime in my
table. I use the Now() function to default the current
datetime, which works fine unless the time is 12:00:00
AM, then only the date is stored. This causes problems
because I use this field for time calculations. How do I
resolve this? Is the a bug in Access 2000? I am running
Access 2003, but this database is in Access 2000 format.
Thanks.
 
V

Van T. Dinh

DateTime Field values are stored similar to Double with the the integral
part represents the number of days since 30/Dec/1899 and the fractional part
represent the time since midnight as a fraction of a day, e.g. 6:00 AM is
0.25, mid-day is 0.5.

Of course, that means mid-night is 0.0. If you don't assign any format,
Access will not display the time component if it is zero, i.e. mid-night but
it is still there except that the value is zero!

This has been the same since Access 1.0 and no, it is not a bug.
 
Top