DateAdd



Adds offset intervals to a date/time value and returns the new date/time. Use a negative offset to subtract. Interval names are not case-sensitive.

String DateAdd(String dateTime, String interval, Numeric offset)

Interval Aliases
Year yy, yyyy
Quarter qq, q
Month mm, m
Week ww, wk
Weekday dw (Monday to Friday)
Day dy
DayOfYear
Hour hh
Minute mi
Second s
Millisecond ms

Result format

The result uses the server's default date/time format, which depends on its culture settings. Wrap DateAdd in FormatDateTime for a predictable format.


round-pushpin Adds one month to January 31st, 2024 (returns 2024-02-29).
SELECT FormatDateTime(DateAdd('2024-01-31', 'Month', 1), 'yyyy-MM-dd') as Result FROM Single

round-pushpin Subtracts ten days from the current UTC date.
SELECT FormatDateTime(DateAdd(DateTimeUTC(), 'Day', -10), 'yyyy/MM/dd hh:mm:ss tt') as Result FROM Single




SQL :: Floor
Returns the largest whole number that is less than or equal to the given number.
SQL :: FormatDateTime
Parses a date/time value and returns it formatted with a .NET date/time format string. See DateTime for the format specifiers.
SQL :: FormatNumeric
Formats a number using a .NET numeric format string and returns the result as text.
SQL :: Guid
Returns a new random globally unique identifier.
SQL :: IfNull
Returns the given value, or the default value when the given value is null.
SQL :: IfNullNumeric
Returns the given number, or the default number when the given value is null.
SQL :: IIF
Short for "immediate if": returns whenTrue when the condition is true and whenFalse otherwise. The condition is usually one of the boolean functions such as IsEqual or IsGreater.
SQL :: IndexOf
Returns the zero-based position of the first occurrence of textToFind in textToSearch, starting the search at offset. Returns -1 when it is not found.
SQL :: IsBetween
Returns true (1) if the value is within the given range, including the range boundaries.
SQL :: IsDouble
Returns true (1) if the given value can be converted to a decimal number.