Date/Time recorded in a single field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Access 2003. I want to Time Stamp changes to records in a table. I have been
using the Now() function, but the only way I can get the field in the table
to record/display the Date AND Time is by setting the DataType for the field
as Text. I view this as backwards thinking, and foolish movement away from
the available Date/Time functions and tools. I have wondered if this is just
a matter of using the correct Input Mask, but neither Long Date or Long Time,
seems to meet my needs. Is there a custom Input Mask which solves this
issue, or am I going about this in the wrong fashion? If it is a matter of a
custom Input Mask, what might it look like? As always, I appreciate the
great help available here.
 
The table's field should be Date/Time type. You can set the format for how
to display the data in the field's Format property... default, I believe, is
Short Date. Change it to General or some other desired format.
 
The said:
Access 2003. I want to Time Stamp changes to records in a table. I
have been using the Now() function, but the only way I can get the
field in the table to record/display the Date AND Time is by setting
the DataType for the field as Text. I view this as backwards
thinking, and foolish movement away from the available Date/Time
functions and tools. I have wondered if this is just a matter of
using the correct Input Mask, but neither Long Date or Long Time,
seems to meet my needs. Is there a custom Input Mask which solves
this issue, or am I going about this in the wrong fashion? If it is
a matter of a custom Input Mask, what might it look like? As always,
I appreciate the great help available here.

The best Input Mask is NO Input Mask. If you are using Now() then your
table is definitely storing both the Date and Time. You just have a mask or
a format property that is hiding this from you.

For the Format property you can just enter exactly what you want to see.
For example you could enter...

yyyy-mm-md hh:nn:ss ampm
 
Date/Time Field in JET (default database engine for Access) stores both date
and time. Now() function certainly returns date and time.

I think you got mixed up between InputMask and Format Property. InputMask
is used to restrict how the user enters the data. Format is used to
instruct Access how to *display* the data. Since you use Now() to create
the Field values, you don't need InputMask.

Check Access Help for the InputMask and Format Property.
 
Back
Top