Languages
[Edit]
EN

MySQL - MINUTE() function example

0 points
Created by:
Veer-Ahmad
487

In this article, we would like to show you MINUTE() function example in MySQL.

Syntax:

SELECT MINUTE('YYYY-MM-DD hh:mm:ss');

Where:

  • YYYY - four-digit year format, e.g. 2021,
  • MM - month number (counted from 01 to 12),
  • DD - day number (from 01 to 31 - depending on the month),
  • hh - hour number (from 00 to 24),
  • mm - minute number (from 00 to 59),
  • ss - second number (from 00 to 59).

Practical example

In this example, we will use MINUTE() function to display only a minute from a DATETIME value.

Query:

SELECT MINUTE('2021-01-01 11:41:31');

Result:

MySQL - MINUTE() function result
MySQL - MINUTE() function result

Related posts

Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

MySQL

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join