MINUTE() - Minutes of Time

Q

How to extract the minutes from a given time using the MINUTE() function?

✍: FYIcenter.com

A

MINUTE(time) is a MySQL built-in function that returns the minute value from a given time. For example:

SELECT MINUTE(NOW()), NOW();
  -- +---------------+---------------------+
  -- | MINUTE(NOW()) | NOW()               |
  -- +---------------+---------------------+
  -- |             6 | 2023-11-14 23:06:09 |
  -- +---------------+---------------------+

Reference information of the MINUTE() function:

MINUTE(time): int
  Returns the minutes for time, in the range 0 to 59.

Arguments, return value and availability:
  time: Required. The time to extract the minute from.
  int: Return value. The minute value.
  Available since MySQL 4.

Related MySQL functions:

 

MONTH() - Month of Year

MICROSECOND() - Microseconds of Time

MySQL Functions on Date and Time

⇑⇑ MySQL Function References

2023-11-17, 254🔥, 0💬