Categories:
Semi-structured Data Functions (Type Predicates)

IS_TIME

Verifies whether a VARIANT value contains a TIME value.

See also:
IS_<object_type> , IS_DATE , IS_DATE_VALUE , IS_TIMESTAMP_*

Syntax

IS_TIME( <variant_expr> )

Examples

Get all TIME values in a VARIANT column.

Note

The output format for time values is set using the TIME_OUTPUT_FORMAT parameter. The default setting is HH24:MI:SS.

Create and load the table:

create or replace table vardttm (v variant);
BEGIN WORK;
insert into vardttm select to_variant(to_date('2017-02-24'));
insert into vardttm select to_variant(to_time('20:57:01.123456789+07:00'));
insert into vardttm select to_variant(to_timestamp('2017-02-24 12:00:00.456'));
insert into vardttm select to_variant(to_timestamp_ltz('2017-02-24 13:00:00.123 +01:00'));
insert into vardttm select to_variant(to_timestamp_ntz('2017-02-24 14:00:00.123 +01:00'));
insert into vardttm select to_variant(to_timestamp_tz('2017-02-24 15:00:00.123 +01:00'));
COMMIT WORK;

Show the TIME values in the data:

select * from vardttm where is_time(v);
+------------+
| V          |
|------------|
| "20:57:01" |
+------------+