MariaDB: MINUTE Function
This MariaDB tutorial explains how to use the MariaDB MINUTE function with syntax and examples.
Description
The MariaDB MINUTE function returns the minute portion of a date value.
Syntax
The syntax for the MINUTE function in MariaDB is:
MINUTE( date_value )
Parameters or Arguments
- date_value
- A time or datetime value from which to extract the minute.
Note
Applies To
The MINUTE function can be used in the following versions of MariaDB:
- MariaDB 10
Example
Let's look at some MariaDB MINUTE function examples and explore how to use the MINUTE function in MariaDB.
For example:
SELECT MINUTE('2014-05-19 09:15:18.000004'); Result: 15 SELECT MINUTE('2014-05-19 15:21:05'); Result: 21 SELECT MINUTE('12:01:06'); Result: 1 SELECT MINUTE('838:59:01'); Result: 59
This last MINUTE example would display the minute portion of the current system time (current system time is returned by the CURTIME function).
SELECT MINUTE(CURTIME());
Advertisements