invantive documentationpart of invantive cloud
Invantive Support ForumsLog In / Sign Up

MINUTE

Syntax

%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> MINUTE[MINUTE]:::quoted
    MINUTE --> End((END))

Purpose

The MINUTE SQL function extracts the minutes from a date/time.

See also DAY, HOUR, MICROSECOND, MILLISECOND, MONTH, SECOND and YEAR.

Parameters:

  • Input (datetime): the date/time to extract the minutes from.

Returns: the minutes as an int32.

Examples

The following example extracts the minutes from current system date/time in UTC:

select minute(sysdateutc)

-------------------
6

The following example extracts the minutes from a fixed date/time:

select minute(to_date('20260101123456', 'YYYYMMDDHH24MISS'))

-------------------
34