• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 177
  • Last Modified:

Adjust Date in Field

I have a table myTable.  It has a field myDateField.  There are thousands of records in the table.

I need a query that will update the year portion of the dates in myDateField by adding 4 years.  For example, if the value is 6/1/2005, I need to update it to 6/1/2009.
1 Solution
Aneesh RetnakaranDatabase AdministratorCommented:
update urtable
Set myDateField = DATEADD(year, 4, myDateField)
WHERE myDateField is not null
wsturdevAuthor Commented:
Perfect!  Thanks.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now