Scalar function
Returns NULL if either argument is NULL. Date arithmetic overflow raises an error.
Syntax
Scalar
Arguments
Returns
- Type: DATE
- NULL behavior: Returns NULL if either argument is NULL. Date arithmetic overflow raises an error.
Properties
Units
- Input unit: Calendar days
- Output unit: DATE
Usage notes
- A negative day count moves forward.
Examples
Subtract calendar days
A negative amount adds days
Limitations
- BIGINT is not accepted for this SQL form. Use the integer types listed above; narrower integer conversions are not established here.
- Use DATE_SUB; DATESUB is not an established SQL alias.
Last modified on October 15, 2026