---
title: "MONTH"
description: "The MONTH SQL function extracts the months from a date/time."
language: en
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/month
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/month
updated: 2026-08-09T00:00:00Z
license: https://documentation.invantive.eu/en/
---

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

## Purpose
The `MONTH` SQL function extracts the months from a date/time.

See also [[DAY]], [[HOUR]], [[MICROSECOND]], [[MILLISECOND]], [[MINUTE]], [[SECOND]] and [[YEAR]].

Parameters:
- Input (`datetime`): the date/time to extract the months from.

Returns: the month as an `int32`.

## Examples
The following example extracts the months from current system date/time in UTC:
```sql
select month(sysdateutc)

-------------------
6
```
The following example extracts the months from May 1, 2026:
```sql
select month(to_date('20260501', 'YYYYMMDD'))

-------------------
5
```