Current Year ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

A field contains the 4 digit year. In my query I put >2003 in critieria to
show this year & last last year data only. I would rather be flexible & code
(Current Year - 2) but don't see how to code it. I've reviewed DatePart &
searched this forum & looked in some books but still have not got it
working. Thanks
 
try
year(date)-2

Teddy

NigelB said:
A field contains the 4 digit year. In my query I put >2003 in critieria to
show this year & last last year data only. I would rather be flexible &
code
searched this forum & looked in some books but still have not got it
working. Thanks
 
(Year(Date()) - 2)

The Year function will extract the year from the current date.
 
Back
Top