Year() function not working

Nick Booth

New member
Local time
Today, 13:07
Joined
Jun 25, 2000
Messages
5
I can't get the Year function to work.
Month and Day both work fine and code completion works with them but when I type Year( no code completion hint pops up. If I complete the function it always produces a run-time error such as type mismatch as if the year function did not exist.
Can anyone help, please?
 
Year(Date) should work (does with mine).

Did you try installing access again? Might be needed..

You might also use format('yyyy',Date).
 
This was a bug in A95 and possibly still exists in some places in newer versions. Use either the format() function suggested by MHM or the datepart() function.
 

Users who are viewing this thread

Back
Top Bottom