Last updated 1 year ago
This function returns an integer representing the specified datepart of the specified date. ().
DATEADD (datepart , number , date )
DATEADD( <date_or_time_part>, <value>, <date_or_time_expr> )
Code:
SELECT DATEADD(year,123, '20060731') as ADDDATE;
Result:
ADDDATE| ------------------------+ 2129-07-31 00:00:00.000|
SELECT DATEADD(year, 123, '20060731') as ADDDATE;