---
title: "MESE"
description: "La funzione SQL MONTH estrae i mesi da una data/ora."
language: it
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/it/docs/invantive-universalsql/grammar/sql-functions/month
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/month
updated: 2026-12-04T14:01:14Z
license: https://documentation.invantive.eu/it/
---

## Sintassi
```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))
```

## Scopo
La funzione SQL `MONTH` estrae i mesi da una data e un'ora.

Vedi anche [[DAY]], [[HOUR]], [[MICROSECOND]], [[MILLISECOND]], [[MINUTE]], [[SECOND]] e [[YEAR]].

Parametri:
- Dati di input (`datetime`): la data e l'ora da cui estrarre i mesi.

Restituisce: il mese sotto forma di `int32`.

## Esempi
L'esempio seguente estrae i mesi dalla data e dall'ora correnti del sistema in UTC:
```sql
select month(sysdateutc)

-------------------
6
```
L'esempio seguente estrae i mesi da maggio 1, 2026:
```sql
select month(to_date('20260501', 'YYYYMMDD'))

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

