Update field with current date

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

Guest

I need to update a field with the durrent date using an update query. It
needs to be in the YYYYMMDD format. I'm using Access 2003.

TIA

Rick
 
I need to update a field with the durrent date using an update query. It
needs to be in the YYYYMMDD format. I'm using Access 2003.

TIA

Rick

If this is a Date datatype field, the format is irrelevant.

Update YourTable Set YourTable.[YourDate] = Date()

will set each record in the table to the current date.

You can display the date using any valid date format.
For example, set the Format property of the control to:
yyyymmdd

to display today's date as 20070816
 
If your field is a Datetime datatype then update with Date() but if it
is text then update with Format(Date(),"yyyymmdd")
 
Back
Top