MINUTE_SECOND

MINUTE_SECOND in SQL is a unit for the expression in functions like DATE_ADD() or DATE_SUB(). It is used to specify a period of time in the format "MINUTES:SECONDS" for manipulating or calculating time intervals in SQL.

Example

SELECT MINUTE_SECOND('2022-12-17 15:35:42');

Output

353000

Explanation

MINUTE_SECOND is a MySQL function that returns the minutes and seconds of a datetime as an integer in the format MMSS00 (minutes, seconds, and some zeroes). The above example returns 353000, indicating 35 minutes and 30 seconds from the original datetime value.

For in-depth explanations and examples SQL keywords where you write your SQL, install our extension.