seconds_sub
Description
Syntax:
DATETIME SECONDS_SUB(DATETIME date, INT seconds)
This function subtracts the specified number of seconds from the given date.
date
can be of DATE or DATETIME type, and the returned result is of DATETIME type.
Example
mysql> select seconds_sub("2020-01-01 00:00:00", 1);
+---------------------------------------+
| seconds_sub('2020-01-01 00:00:00', 1) |
+---------------------------------------+
| 2019-12-31 23:59:59 |
+---------------------------------------+
Keywords
SECONDS_SUB