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!

Add one year to date/time field

Status
Not open for further replies.

PaultheS

Programmer
May 12, 2005
92
CA
I'm looking to run an update query in MS Access that will take an existing Date/Time field and add one year to it. I was looking at the DateSerial function but I believe that would get rid of the times and I need those to stay the same. Any thoughts?
 
And what about the DateAdd function ?
UPDATE myTable SET [DateTime field]=DateAdd('yyyy',1,[DateTime field]) WHERE ...

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

Part and Inventory Search

Sponsor

Back
Top