Languages
[Edit]
EN

MySQL - MINUTE() function example

0 points
Created by:
Dirask Community
6240

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