Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date update query

Status
Not open for further replies.

Pheonix3077

IS-IT--Management
Mar 7, 2003
6
US
I'm trying to create a query where any date that is equal to or older than a year will be changed to reflect the next year. So a date that is 5/23/2003 will become 5/23/2004. Any ideas on how I would do this? thanks for the help.
 
Something like this ?
UPDATE myTable SET myDate=DateAdd("yyyy",1,myDate)
WHERE myDate<=DateAdd("yyyy",-1,Date())
;

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top