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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-03-26 : 09:19:04
|
| Janie writes "I have thousands of rows that contain years of 2002 that I need to change to 2003, how do I do that? I've tried several different ways and it's not working. Thanks,03/02/2002 needs to be changed to 03/02/2003" |
|
|
Nazim
A custom title
1408 Posts |
Posted - 2002-03-26 : 09:24:43
|
| Check for DateADD function in BOL.-------------------------------------------------------------- |
 |
|
|
jackstow
Posting Yak Master
160 Posts |
Posted - 2002-03-26 : 09:29:09
|
| TryUPDATE DateTableSET DateColumn = DATEADD(year,1,DateColumn) |
 |
|
|
Arnold Fribble
Yak-finder General
1961 Posts |
Posted - 2002-03-26 : 10:08:39
|
| Note that when 29th Feb is mapped into a non-leap year, it goes to 28th Feb. This may or may not be what you want. |
 |
|
|
setbasedisthetruepath
Used SQL Salesman
992 Posts |
Posted - 2002-03-26 : 11:33:32
|
You've piqued my curiousity ... when would you ever not want that?quote: Note that when 29th Feb is mapped into a non-leap year, it goes to 28th Feb. This may or may not be what you want.
setBasedIsTheTruepath<O> |
 |
|
|
Arnold Fribble
Yak-finder General
1961 Posts |
Posted - 2002-03-26 : 11:45:39
|
Um. Don't know sir. Seemed like a good thing to say at the time. |
 |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2002-03-26 : 13:01:43
|
| when you want it to be the day 1 day after feb 28? |
 |
|
|
setbasedisthetruepath
Used SQL Salesman
992 Posts |
Posted - 2002-03-26 : 13:44:32
|
setBasedIsTheTruepath<O> |
 |
|
|
|
|
|