Languages
[Edit]
EN

MySQL - MINUTE() function example

0 points
Created by:
Dirask Community
6390

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

MySQL - dates

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