Now() function

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

Guest

On form when staff enter that a task is completed then in the underlining
table the completed date is automatically entered. In the field [Completed
Date] the Default Value is the Now() function.

So this is what is entered into the [Completed Date] field: 11/1/2006
7:57:24 AM

I just want the date (11/1/06) not the time (7:57:24 AM). The time is
causing me problems when I try to query out the information. Using input
mask or format does not work. Is there a way that the [Completed Date] can
automatically be entered but just the date?

Also, how can I change the dates already entered? Just changing the input
mask or format does not help when I try to query the information out?

Thanks for any help
 
On form when staff enter that a task is completed then in the underlining
table the completed date is automatically entered. In the field [Completed
Date] the Default Value is the Now() function.

So this is what is entered into the [Completed Date] field: 11/1/2006
7:57:24 AM

I just want the date (11/1/06) not the time (7:57:24 AM). The time is
causing me problems when I try to query out the information. Using input
mask or format does not work. Is there a way that the [Completed Date] can
automatically be entered but just the date?

Also, how can I change the dates already entered? Just changing the input
mask or format does not help when I try to query the information out?

Thanks for any help

If you just want the Date portion use Date() instead of Now() for the
new entries.
To change the existing values from date and time to just date, use an
Update Query:

Update YourTable Set YourTable.DateField = int([DateField]);
or ...
Update YourTable Set YourTable.DateField = DateValue([DateField]);
Also look up DateValue in VBA help
 
Back
Top