minutes_sub

description

Syntax

DATETIME MINUTES_SUB(DATETIME date, INT minutes)

Subtracts a specified number of minutes from a datetime or date

The parameter date can be DATETIME or DATE, and the return type is DATETIME.

example

1. mysql> select minutes_sub("2020-02-02 02:02:02", 1);
2. +---------------------------------------+
3. | minutes_sub('2020-02-02 02:02:02', 1) |
4. +---------------------------------------+
5. | 2020-02-02 02:01:02                   |
6. +---------------------------------------+

keywords

1. MINUTES_SUB