MINUTE returns the minute portion of a value.

Syntax

MINUTE ( expression )

Arguments

expression: a DATE, TIMESTAMP, or non-LONG VARCHAR string value that is properly formatted to represent a DATE or TIMESTAMP.

Returns

  • An INTEGER between 0 and 59. Returns NULL if expression is NULL.

Examples

SELECT orderDate, MINUTE(orderDate) AS orderDateMinute FROM MYSQL.inventory.cust;

VALUES MINUTE(CAST('2012-06-20 15:23:45' AS TIMESTAMP))
-- Returns 23