Fix Date Field in SQL Database

I have a MSSQL database with a date field that is messed up.  Due to complicated issue. Many of the timestamp fields in my database went form the date "1/5/1900 9:24:32 AM"  And it should be "1/5/2011 9:24:32 AM"  

I am looking for a that will read all the fields in the database check to see if the year field is 1900 and if it is modify to 2011

Can someone give me a method for doing this.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Atdhe NuhiuCommented:
update table
set datefield = dateadd(yy,111,datefield )
where year(datefield )=1900

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
update yourtable set yourfield = dateadd(year,111,yourfield ) where datepart(year, yourfield ) = 1900
infoadminAuthor Commented:
Thanks for the quick responce
Atdhe NuhiuCommented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.