DATEADD function [Date and time]

Function

Returns the date produced by adding the specified number of the specified date parts to a date.

Syntax

DATEADD ( date-part, numeric-expression, date-expression )

Parameters

date part The date part to be added to the date.

For a complete listing of allowed date parts, see “Date parts”.

numeric-expression The number of date parts to be added to the date. The numeric-expression can be any numeric type; the value is truncated to an integer.

date-expression The date to be modified.

Example

SELECT DATEADD( month, 102, '1987/05/02' ) FROM iq_dummy

Usage

DATEADD is a Transact-SQL compatible data manipulation function.

Standards and compatibility