

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

# Jenis fungsi konversi
<a name="sql-functions-type-conv"></a>

 Fungsi konversi tipe digunakan untuk mengubah tipe data dari nilai dari satu ke yang lain. Mereka sangat penting untuk memastikan kompatibilitas data dan melakukan operasi yang memerlukan data dalam format tertentu. 


|  **Fungsi**  |  **Tanda tangan**  |  **Deskripsi**  | 
| --- | --- | --- | 
| `TO_DATE` |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/id_id/iot-sitewise/latest/userguide/sql-functions-type-conv.html)  |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/id_id/iot-sitewise/latest/userguide/sql-functions-type-conv.html)  | 
| `TO_TIMESTAMP` |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/id_id/iot-sitewise/latest/userguide/sql-functions-type-conv.html)  |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/id_id/iot-sitewise/latest/userguide/sql-functions-type-conv.html)  | 
| `TO_TIME` |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/id_id/iot-sitewise/latest/userguide/sql-functions-type-conv.html)  |  [See the AWS documentation website for more details](http://docs.aws.amazon.com/id_id/iot-sitewise/latest/userguide/sql-functions-type-conv.html)  | 
| `CAST` | PEMERAN (<expression>AS<data type>) | Mengkonversi entitas, atau ekspresi yang mengevaluasi ke nilai tunggal, dari satu jenis ke jenis lainnya.<br />Tipe data yang didukung adalah:[See the AWS documentation website for more details](http://docs.aws.amazon.com/id_id/iot-sitewise/latest/userguide/sql-functions-type-conv.html) | 

**Example dari query SQL menggunakan fungsi yang terdaftar:**  

```
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
```