dateadd question

  • Thread starter Thread starter Anna Tolstoj
  • Start date Start date
A

Anna Tolstoj

Hi,

I'm importing data into Access from an external database. Unfortunately
some of my date data comes across incorrect and I need to update it. For
instance I will have dates listed as 01/01/1900 instead of 01/01/2000,
01/01/1901 instead of 01/01/2001 and so forth.

I thought I could use the following in an update query:

DateAdd("yyyy",100,"invoice_date")

but I'm getting a "Data type mismatch in criteria expression" error when I
try to run the query.

Any suggestions on what I could be doing wrong?

Thanks,

Anna
 
Your third parameter should NOT be a string.

Set [invoice_date] = DateAdd("yyyy",100,[invoice_date])
 
oh my, sometimes I wonder how I even get out of bed in the morning...

Thanks for straightening me out so quickly.

:-)


John Spencer (MVP) said:
Your third parameter should NOT be a string.

Set [invoice_date] = DateAdd("yyyy",100,[invoice_date])

Anna said:
Hi,

I'm importing data into Access from an external database. Unfortunately
some of my date data comes across incorrect and I need to update it. For
instance I will have dates listed as 01/01/1900 instead of 01/01/2000,
01/01/1901 instead of 01/01/2001 and so forth.

I thought I could use the following in an update query:

DateAdd("yyyy",100,"invoice_date")

but I'm getting a "Data type mismatch in criteria expression" error when I
try to run the query.

Any suggestions on what I could be doing wrong?

Thanks,

Anna
 
Back
Top