UPDATE yourTable
SET YourDate = DateSerial(2008,Month(YourDate), Day(YourDate))
WHERE YourDate between #2007-01-01# and #2007-12-31#
You didn't post how you wanted th]e year changed or what you wanted the
change limited to. So the above is one idea.
Another way to make the same change
UPDATE yourTable
SET YourDate = DateAdd("yyyy",1,YourDate)
WHERE YourDate between #2007-01-01# and #2007-12-31#
The first version would change the year of every record in the database to
2008 if you dropped the criteria.
The second version would add one year to every record in the database.
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
Dado said:
I want to change only the year in date field of one table. I have tried
with
update query but i don't have right function or expression.