What is value of "12:00:00 a.m."?

K

KitenutDave

An Access 2000 database table has a field of type Date with no default value.
The table is being populated by another process that I'm not privy to.
Somehow, there are many records in the table that have no date component in
this field, just a time component, "12:00:00 a.m.". (From a business
perspective, these records should probably be Null in that field, but they're
not). When I try to move these records into a SQL Server database table with
this field setup as a DateTime field, the import fails with an overflow error
caused by these records.
I have fixed this with an inelegant workaround, but the question remains:
What is the actual value in this field that is causing the error?
Thanks,
Dave
 
J

John W. Vinson/MVP

An Access Date/Time value is stored as a Double Float count of days and
fractions of a day (times) since midnight, December 30, 1899. What you're
seeing indicates that the field contains a zero. Check to be sure you don't
have a Default of zero set somewhere; NULL would indeed be better.

John W. Vinson/MVP
 
P

peregenem

The title of this thread reminds me of a gem we encountered the other
day. This in a WHERE clause:

((Not MyDateTimeCol) = Null)

Makes my head hurt even now!
 

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