简体   繁体   中英

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM