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 |
|
Ambikaa
Starting Member
43 Posts |
Posted - 2008-08-23 : 01:33:47
|
| Hi,I have 3 plans like 30days, 60 and 90 days, if the user chooses the 30 days plan by today then the plan expiration date should be calculated with 30 dasys. through code i can do, is there any possibility to do in query?for eguser chooses 30 days plantoday date 23/08/2008plan expire date 21/09/2008help me |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-23 : 01:37:33
|
| yup. use DATEADD()SELECT DATEADD(d,DATEDIFF(d,0,GETDATE())+@Plan,0) AS ExpirationDate |
 |
|
|
|
|
|