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 |
|
shebert
Yak Posting Veteran
85 Posts |
Posted - 2009-12-11 : 13:39:28
|
| SQL has a built in command called DATEADD which allows me to specify how many month to roll forward from a starting date….It does not however have a DATESUBTRACT to roll backwards from a starting date…any ideas how this is accomplished.Steve |
|
|
doran_doran
Posting Yak Master
179 Posts |
Posted - 2009-12-11 : 13:42:03
|
| just use the "-" minus sign before the number of month |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-12-11 : 13:42:11
|
| you can rollbackwards using negative value likeDATEADD(mm,-5,GETDATE()) will roll 5 months backwards from today |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-12-11 : 13:42:37
|
|
 |
|
|
|
|
|