ADD N NUMBER OF DAYS IN CURRENT DAYS IN SQL SERVER 2005

–1.You can directly add the no of days you want to add in the date.Eg.

DECLARE @DATE AS DATETIME

SET @DATE = GETDATE()

SELECT @DATE + 5

Output
___________________

2010-08-10 14:46:08.137

–2.You can use DateAdd function to add the no of days in the date.Eg.

DECLARE @DATE AS DATETIME

SET @DATE = GETDATE()

SELECT DATEADD(d , 5 , getdate())

OUTPUT
__________________

2010-08-10 14:47:22.843

_____________________________________________________

Happy Programming.

Pawan Kumar
Pawankkmr@hotmail.com