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-11-30 : 16:28:46
|
| DECLARE @STARTDATENEW DATETIME SET @STARTDATENEW = DateAdd(day, 1, @STARTDATE) |
|
|
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts |
Posted - 2011-11-30 : 16:30:40
|
It adds one day to the date you have passed in @STARTDATE.Try with getdate() and you will understandDECLARE @STARTDATENEW DATETIMESET @STARTDATENEW = DateAdd(day, 1, getdate()) select @STARTDATENEW |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2011-12-01 : 05:08:16
|
quote: Originally posted by AdamWest DECLARE @STARTDATENEW DATETIME SET @STARTDATENEW = DateAdd(day, 1, @STARTDATE)
Have a look at DATEDIFF in SQL Server for more informationMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|