MESE
Sintassi
%%{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:
select month(sysdateutc)
-------------------
6
L'esempio seguente estrae i mesi da maggio 1, 2026:
select month(to_date('20260501', 'YYYYMMDD'))
-------------------
5