function to return today's date

  • Thread starter Thread starter Marty
  • Start date Start date
M

Marty

Drop the () and just write, TEST = Date, if you are using
VBA. It should return 01/23/2004. If you are doing an
update query or setting the default date of a field try
formating the field for the table object to Short in the
table properties and use Now() instead of Date().

Marty
 
Note that using Now() will also load a time into the field's value, which
often can play havoc when writing queries where you want to return records
based just on the date. If the programmer doesn't remember that the value
contains a time component and use a calculated field for searching instead
of the real field, many records may be missed by a Between Date1 And Date2
query criterion.
 
Back
Top