user311357
user311357

Reputation: 1

DateAdd not working in Calculated Query Field

I have tried to make a calculated field in a query with the build tool

EindDatum: DateAdd("yyyy",1,[tblVERHURING]![DatumVerhuring])      

I get an error

The expression you entered contains invalid syntax

If I use the SQL tool and type the following, I get the result I want

SELECT DATEADD("yyyy", 1, [tblVERHURING]![DatumVerhuring]) AS EindDatum
FROM tblVerhuring;

My question: is it possible to build this SQL expression with the build tool, and what should the code be?

Upvotes: 0

Views: 304

Answers (1)

jbud
jbud

Reputation: 694

you probably need to change the yyyy for your language.

Maybe this will help you:

EindDatum: DateAdd("jjjj",1,[tblVERHURING]![DatumVerhuring]) 

This works for Dutch versions of MS Access

see the related docs

Upvotes: 1

Related Questions