Reputation: 55
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.
Upvotes: 2
Views: 4588
Reputation: 1269513
Just use the built-in date()
function in MS Access:
DQRY = "Update " & tb & " Set ImportDate = date() "
Upvotes: 2