MySQL Minute is one of the Date Functions, which returns the Minute value from the given time. This Minute method returns a value from 0 to 59. The syntax of the Minute Function is as shown below:
MINUTE(Time or DateTime expression);
MySQL Minute function Example
The following examples help you understand the use of Minute method. Here, we are printing the Minute from time and DateTime expressions.
SELECT MINUTE('2019-11-13 12:35:44');
SELECT MINUTE('2019-11-19 12:11:44.111234');
Minute Example 2
The following Function queries show you what happens when we try to return the minute from string DateTime, wrong time, or 0 as the time value.
SELECT MINUTE(NOW() + 12);
This example shows you how to use this Minute method on table data. Here, we are finding or returning Minutes from the Hire Date column. For this Date method demo, we are using MySQL Workbench to write a query against the customer database.
SELECT EmpID, FirstName, LastName, Occupation, YearlyIncome, Sales, HireDate, MINUTE(HireDate) FROM customer;