Tabular IQ
Back to Function Index

MINUTE()

Overview

MINUTE() extracts the minute component from a date or timestamp value. This function is useful for time-based calculations, filtering, and reporting where you need to work with the minute portion of a datetime value.

Function Format

MINUTE(date)

Return Value

MINUTE() returns an integer between 0 and 59

Examples


MINUTE(DATE(2007, 07, 04, 12, 30, 22)) = 30    (30 minutes past the hour)
MINUTE(DATE(2007, 12, 25, 8, 10, 20)) = 10     (10 minutes past the hour)
MINUTE(DATE(2025, 1, 1, 0, 0, 0)) = 0          (start of hour)
MINUTE(DATE(2025, 1, 1, 23, 59, 59)) = 59      (end of hour)
MINUTE(CURDATE()) = 45                          (if run at 45 minutes past the hour)
MINUTE(NULL) = NULL                             (NULL input)

Notes

  • Important behaviors:
    • Returns an integer between 0 and 59
    • Returns NULL for NULL input
    • Works with both date and timestamp values
    • Ignores seconds and milliseconds
    • Preserves the exact minute value
  • Common use cases include:
    • Time-based filtering
    • Time calculations
    • Time reporting
    • Time validation
    • Time-based grouping
  • The function can be used with:
    • Date literals
    • Timestamp values
    • Date columns
    • Date functions
  • This function is often used in combination with other date/time functions like HOUR(), SECOND(), and DATEPART() for more complex time manipulations.
  • For extracting other time components, use HOUR() or SECOND() functions.

See Also