Kudos to MajP for this awesome explanation of the DATE/TIME field type:
[tt]The issue is formatting. Format the table, form, or query fields/control as you want to see the information displayed.
Todays date (9/26/2007) is the number 39351 in every table or variable in access regardless of any formatting. It is 39351 since there are 39351 days since 30 Dec 1899. The baseline date is 30 dec 1899 which is the value 0. It is now 10:32:17 PM which is a value of .9390856481. Because 10:32 is about 22.5 hours of a complete day which is about .939 of a day. So 9/26/2007 10:32:17 PM is the number
39351.9390856481. So the difference between now and date is
39351 vs 39351.9390856481. But it just does not matter because I can show these numbers any way I want in a field, table, query, or form.
Public Sub testDate()
Debug.Print CDate(1)
Debug.Print CDate(-1)
Debug.Print Date
Debug.Print CDbl(Date)
Debug.Print Now
Debug.Print CDbl(Now())
Debug.Print #9/26/2007# - #12/31/1899#
Debug.Print Format(CDate(39351.9381), ShortDate)
Debug.Print Format(CDate(39351.9381), "dd mmm yyyy")
Debug.Print Format(CDate(39351.9381), "hh:NN:SS AM/PM")
End Sub
12/31/1899
12/29/1899
9/26/2007
39351
9/26/2007 10:32:17 PM
39351.9390856481
39350
9/26/2007 10:30:52 PM
26 Sep 2007
10:30:52 PM[/tt]
Leslie
Essential for database developers:
The Fundamentals of Relational Database Design
Understanding SQL Joins