MySQL MINUTE() Function
In MySQL, the MINUTE() function extracts and returns the minute part of a time.
MINUTE() Syntax
Here is the syntax of MySQL MINUTE() function:
MINUTE(time)
Parameters
time- Required. A time or datetime expression.
Return value
The MySQL MINUTE() function extracts and returns the minute part of the time, and it returns a number between 0 to 59.
If the argument is NULL, the MINUTE() function will return NULL.
MINUTE() Examples
Here are some examples of the MINUTE() function.
SELECT
MINUTE('10:11:12'),
MINUTE('2022-02-28 10:11:12');
+--------------------+-------------------------------+
| MINUTE('10:11:12') | MINUTE('2022-02-28 10:11:12') |
+--------------------+-------------------------------+
| 11 | 11 |
+--------------------+-------------------------------+