- Categories:
AS_ TIME¶
Casts a VARIANT value to a TIME value. This function does not convert values of other data types, including timestamps, to TIME values.
- See also:
Syntax¶
Arguments¶
variant_exprAn expression that evaluates to a value of type VARIANT.
Returns¶
The function returns a value of type TIME or NULL:
- If the type of the value in the
variant_exprargument is TIME, the function returns a value of type TIME.
- If the type of the value in the
variant_exprargument doesn’t match the type of the output value, the function returns NULL. - If the
variant_exprargument is NULL, the function returns NULL.
Examples¶
Create a table and load data into it:
Use the AS_TIME function in a query to cast a VARIANT value to a TIME value: