Function Reference

MINUTE

PostgreSQL equivalent:

Returns the minutes of a time.

MySQL 8.1
MINUTE(time)

Parameters

timeTIME
Time or datetime

Return value

An integer from 0 to 59; NULL if the value is not recognized

Examples

Minutes from a date and time

MySQL 8.1
SELECT MINUTE('2022-06-16 16:37:03');
MINUTE('2022-06-16 16:37:03')
37

Start minutes of lessons

MySQL 8.1
SELECT id,
	start_pair,
	MINUTE(start_pair) AS start_minute
FROM Timepair;
idstart_pairstart_minute
108:30:0030
209:20:0020
310:15:0015
411:05:005
512:50:0050
613:40:0040
714:35:0035
815:25:0025

See also