Skip to main content
Subtracts specified days from a date or datetime to get a new datetime.

Syntax

Parameters

d: the date or datetime expression. n: the number of days to subtract from the d.

Return value

Returns a value of the datetime type, NULL is returned if any parameter is NULL or invalid. NULL is returned if the result exceeds the range [0000-01-01 00:00:00, 9999-12-31 00:00:00].

Examples

Text

keywords

DAY,day