---
title: "ORA"
description: "La funzione SQL HOUR estrae l\u0027ora da una data/ora."
language: it
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/it/docs/invantive-universalsql/grammar/sql-functions/hour
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/hour
updated: 2026-12-04T13:41:22Z
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)) --> HOUR[HOUR]:::quoted
    HOUR --> End((END))
```

## Scopo
La funzione SQL `HOUR` estrae l'ora da una data e un'ora.

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

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

Restituisce: l'ora sotto forma di `int32`.

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

-------------------
13
```
L'esempio seguente estrae le ore a partire da mezzogiorno del 1 gennaio, 2026:
```sql
select hour(to_date('20260101120000', 'YYYYMMDDHH24MISS'))

-------------------
12
```

