Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
martinhogan
Starting Member
5 Posts |
Posted - 2012-01-13 : 08:20:39
|
HI,I have a database with Date field that needs to be changed from1975 to 2011. Problem is, I only want to change the year, a notthe day and month.In short change 1975\09\05 to 2011\09\05 1975\09\06 to 2011\09\06 Please helpThanksMartin Hogan |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2012-01-13 : 08:25:06
|
UPDATE dbo.Table1SET Col1 = DATEADD(YEAR, 36, Col1)WHERE Col1 >= '19750101' AND Col1 < '19760101' N 56°04'39.26"E 12°55'05.63" |
 |
|
martinhogan
Starting Member
5 Posts |
Posted - 2012-01-13 : 08:31:30
|
Sheez, thanks SwePezo, after spending a whole day, you solved it for me in a minute.Tried and it worked. Thanks a mil.Martin Hogan |
 |
|
|
|
|