We can add date in sql server with DATEADD function. Example is as below.
Syntax:DATEADD (datepart , number , date )
Complete query will be:
SELECT DATEADD(DAY, 1, '2008-08-30') will result 2008-08-31
SELECT DATEADD(DAY, 2, '2008-08-30') will result 2008-09-01
If want to update any value then we will use it in update statement like below:
Query:
update tbUser set ValidDate=(SELECT DATEADD(month, 6, GETDATE()))
where userid=''