1 Answers

Ashutosh Kumar Verma
Ashutosh Kumar Verma

DATEADD():

 SQL DATEADD() function is used to add a time in given date, like add a year, day or month etc.

Example;

SELECT DATEADD(DAY,1,'2020/12/10');
Output :    2020-12-11 00:00:00.000
SELECT DATEADD(MONTH,1,'2020/12/10');
Output:    2021-01-10 00:00:00.000

SELECT DATEADD(YEAR,1,'2020/12/10');
Output:     2021-12-10 00:00:00.000

Answer