Type conversion functions
Type conversion functions are used to change the data type of a value from one to another. They are essential for ensuring data compatibility and performing operations that require data in a specific format.
Function |
Signature |
Description |
---|---|---|
|
|
|
|
|
|
|
|
|
|
CAST (<expression> AS <data type>) |
Converts an entity, or expression that evaluates to a single value, from one type to another. Supported data types are:
|
Example of a SQL query using the listed functions:
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