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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top