Date/Time data type

  • Thread starter Thread starter David Cleave
  • Start date Start date
D

David Cleave

Hello all

Does the date/time data type store both time and date, or
just a time or just a date?

I ask because I want to be able to date-and-time-stamp
records at the time of creation. So, a new record is
created and some code runs which populates a field or
fields to record the date and time of its creation.

So, do I need to create two fields, one to store the date
of creation and another to store the time of creation, or
just the one field to store both?

Thanks for your help

David
 
Just one field for both date and time.
Set its DefaultValue property to:
=Now()

Internally, Access uses a fractional number to store the date and time. The
integer part represents the date, and the fraction part is the time of day
(e.g noon is 0.5 of a day; 6am is 0.25).
 
Back
Top