Skip to main content
Scalar function
Returns NULL for NULL input. Some date/time components also return NULL when the input is outside their supported calendar range.

Syntax

Scalar

Arguments

Returns

  • Type: INTEGER
  • Possible values: 1 through 12
  • NULL behavior: Returns NULL for NULL input. Some date/time components also return NULL when the input is outside their supported calendar range.

Properties

Usage notes

  • Returns an INTEGER component, or NULL for a NULL input.
  • YEAR and MONTH can extract components from a wider range of UTC or timezone-free dates than other fields.

Examples

Extract a component

NULL input

Limitations

  • String inputs require conversion to a date or timestamp. Use the formats shown here; the example does not cover every date or time format.
Last modified on October 15, 2026