The Access Date/Time data type stores, well, date AND time. If you need to
store only a time, use a text field and build parsing routines.
If you need to DISPLAY only a time, look into formatting in Access HELP --
you didn't mention whether you were working in a table design or on a form
(or report).
By the way, the Now() function is "point-in-time", and includes both date
and time. Have you looked into the Time() function? How would you tell the
difference between 7:55 AM yesterday and 7:55 AM today? Or is this not
important to what you are trying to do?
You can't. The DateTime Data Type always has both a date and a time. When
you enter only a date the time defaults to midnight and when you enter only
a time the date defaults to 12/30/1899.
Access will (by default) display only the time when the date is 12/30/1899
and only the date when the time is midnight which can give the impression
that the non-displayed portion is not being stored, but that is only a
display issue.
formatting only affects how data is displayed, it does not affect the data
itself. there is no way to record a time without a date in a table field
with a Date/Time data type. Now() returns the current date and current time
as a value, regardless of how it's formatted.
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.