MINUTE

The MINUTE function returns the minute of a datetime value as an integer from 0 to 59.

Syntax

MINUTE(
    datetime
)

Parameters
  • datetime: Datetime value such as 15:35:28 or 5:16 PM, from which you want to extract the minute.
Returned value

The MINUTE function returns an integer from 0 to 59.

Additional Information

Even though the MINUTE function requires a datetime type argument, it can also receive as an argument a real number (in which the integer part is considered as a reference to the date and the decimal part as a reference to the time), with general format or with any other format (date and time or other). For this reason, the MINUTE function takes both a time and a date as an argument. In the case of receiving a date as an argument, the day, month and year values are ignored, and only the minute value is extracted.

The datetime argument can be included in the function using a create date/time function, a function that returns a date/time value, as a reference to a column that contains date/time values, or by directly entering the date/time value in any of the accepted formats. In the latter case, the MINUTE function will use the regional configuration and the date and time settings of the client computer in order to interpret the text from which to extract the appropriate value. In this way, the following functions (which receive the same real number as an argument with a different format), will return the same value: 9.

MINUTE("10/15/2016 11:9:14")

MINUTE(42658,4230787037)

Examples

The following example extracts the minute from the field that contains the date and time of each sale:

MINUTE function: Example of use

Related functions
Category
Date and time
Submitted by admin on Tue, 12/04/2018 - 00:04