

Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.

# Funzioni di conversione dei tipi
<a name="sql-functions-type-conv"></a>

 Le funzioni di conversione dei tipi vengono utilizzate per modificare il tipo di dati di un valore da uno all'altro. Sono essenziali per garantire la compatibilità dei dati ed eseguire operazioni che richiedono dati in un formato specifico. 


|  **Funzione**  |  **Firma**  |  **Descrizione**  | 
| --- | --- | --- | 
|  `TO_DATE`  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/it_it/iot-sitewise/latest/userguide/sql-functions-type-conv.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/it_it/iot-sitewise/latest/userguide/sql-functions-type-conv.html)  | 
|  `TO_TIMESTAMP`  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/it_it/iot-sitewise/latest/userguide/sql-functions-type-conv.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/it_it/iot-sitewise/latest/userguide/sql-functions-type-conv.html)  | 
|  `TO_TIME`  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/it_it/iot-sitewise/latest/userguide/sql-functions-type-conv.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/it_it/iot-sitewise/latest/userguide/sql-functions-type-conv.html)  | 
|  `CAST`  |  <data type>CAST (<expression>AS)  |  Converte un'entità o un'espressione che restituisce un singolo valore da un tipo all'altro. I tipi di dati supportati sono: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/it_it/iot-sitewise/latest/userguide/sql-functions-type-conv.html)  | 

**Example di una query SQL utilizzando le funzioni elencate:**  

```
SELECT TO_TIMESTAMP (100) AS timestamp_value,
  TO_DATE(r.event_timestamp) AS date_value,
  TO_TIME(r.event_timestamp) AS time_value
FROM raw_time_series AS r
```