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")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Convert Date 3
Update Query 2
Append/Update Query 6
PARSE DATE FIELD 5
Convert Date 1
appending date to other strings 0
Convert Numeric field to Date 8
Update primary key field with multiple "where" clauses 0

Back
Top