INSERT INTO employee(empName,joining_date) VALUES('Lilly','')Īs we can see in the image, we have successfully inserted eight rows of data in the employee table. INSERT INTO employee(empName,joining_date) VALUES('Samuel','') INSERT INTO employee(empName,joining_date) VALUES('Lucas','') INSERT INTO employee(empName,joining_date) VALUES('William','') INSERT INTO employee(empName,joining_date) VALUES('Simon','') INSERT INTO employee(empName,joining_date) VALUES('Andrew','') INSERT INTO employee(empName,joining_date) VALUES('Paul','') INSERT INTO employee(empName,joining_date) VALUES('Nirnay','') Let us run some queries and observe their output to understand the working of the DATEADD function. Let us understand the usage of the DATEADD function with the help of some examples.
How to use the DATEADD function in SQL Server?
Increment_value: The increment_value represents how much value news to be added to that parameter of the input date.Each part of the date has a specific code for these parameters and these codes are like: Paramter_code: The paramter_code represents that particular parameter of the input date to which incremnet_value is going to be added and that parameter can be anything like day, month, year, hours, minutes, seconds, millisecond, microsecond, or nanosecond of the input date.DATEADD (paramter_code, incremnet_value, input_date )