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 |
|
AdamWest
Constraint Violating Yak Guru
360 Posts |
Posted - 2011-02-03 : 14:13:10
|
| Hello again, for testing purposes, I have a small db with transactions, they are a few months old. I would like to take this column and add months to it so that it's in the current year2010-07-13 00:00:00.000So I need a query that will take the column there called Currentdateand add say 6 months to it. |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2011-02-03 : 14:18:33
|
DATEADD(MONTH, 6, CurrentDate) N 56°04'39.26"E 12°55'05.63" |
 |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2011-02-03 : 14:18:41
|
| SET CurrentDate = dateadd(m,6,Currentdate)JimEveryday I learn something that somebody else already knew |
 |
|
|
AdamWest
Constraint Violating Yak Guru
360 Posts |
Posted - 2011-02-08 : 16:27:09
|
| I entered this as a query but i get an error messageselect dbo.transactionsset currentdate=dateadd(month,6,currentdate)it doesn't like the = |
 |
|
|
AdamWest
Constraint Violating Yak Guru
360 Posts |
Posted - 2011-02-08 : 16:36:29
|
| Sorry about that i have fixed the issue. Thanks for your responses. |
 |
|
|
|
|
|