Conversion Functions
This page contains the explicit conversion functions supported by e6data.
CAST FUNCTION
CAST( <expr> as <target datatype> )
Converts the input expression to the specified target datatype.
The following table contains a matrix of all supported conversions:
TRY CAST FUNCTION
TRY_CAST( <input datatype> , <output datatype> )
Converts the input expression to the specified target datatype, but returns a NULL value instead of raising an error when the conversion can not be performed.
Usages
Support datatype: VARCHAR, NUMBER (or any of its synonyms), DOUBLE, BOOLEAN, DATE, TIMESTAMP
try_cast to DATE accept 'YYYY-MM-DD' format for other formats returns null
try_cast to TIMESTAMP accept 'YYYY-MM-DD HH:mm:ss' format for other formats returns null