Mohd akhtar
Mohd akhtar

Reputation: 55

Access UPDATE to Today's Date

While I'm running below Query from access VBA, it's updating the date to 12/30/1899. Please help me.

DQRY = "Update " & tb & " Set ImportDate =  " & Format(Now, "MM/DD/YYYY") & ";"
db.Execute DQRY

while DORY equivalents to

"Update 600_London_Name Set ImportDate = 09/26/2017;"

Yet the result I get in the table is 12/30/1899. Below is my Table structure.

Table Description

Upvotes: 2

Views: 4588

Answers (1)

Gordon Linoff
Gordon Linoff

Reputation: 1269513

Just use the built-in date() function in MS Access:

DQRY = "Update " & tb & " Set ImportDate =  date() "

Upvotes: 2

Related Questions