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 - 2004-12-13 : 08:21:44
|
| Robert writes "Within an stored procedure I would like to select a date from a table and then add a specified number of months (determined by a field in the same table). I have it pulling the date in the native format yyyy/mm/dd time.ThanksRobert" |
|
|
RM
Yak Posting Veteran
65 Posts |
Posted - 2004-12-13 : 08:29:42
|
| You can use DATEADD ( datepart , number, date ) |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2004-12-13 : 11:07:57
|
| Just to expand on RM's reply:SELECT DATEADD(Month, AddOnMonthsColumn, OriginalDateColumn)FROM MyTableKristen |
 |
|
|
|
|
|