Was this helpful?
IS TIME Predicate
Use IS TIME to determine if a result can be converted to a valid time format.
The IS TIME predicate takes the following form:
IS [NOT] TIME [(precision)]
Where, precision is an integer with a default value of 0. To avoid data loss, the predicate returns False for values that exceed precision.
The following is the input and output of the IS TIME predicate:
Data Type of Input Expression
Output
NULL (of any data type)
Null
TIME, TIMETZ, TIMELTZ
True/False as per precision and possible partial data loss
CHAR/VARCHAR
True/False as per the input expression
All other data types
False
Examples:
istime(null)
is Null.
istime(time('01:11:21'))
is True since the input expression is a valid time value.
istime('01-11-20-000')
is False since the input expression is an invalid time value.
istime(int('1112112'))
is False since the input expression has an invalid data type.
istime('01:11:21.123')
is False since the precision is 0 (default value), but the decimal fractional seconds contain 3 digits, resulting in data loss.
istime('01:11:21.12', 2)
is True since the precision is 2 and the decimal fractional seconds contain 2 digits, resulting in no data loss.
istime(time('01:11:21.33', 2), 2)
is True since the precision for both time and istime is 2, resulting in no data loss.
istime('01:11:21.12345', 3)
is False since the precision is 3, but the decimal fractional seconds contain 5 digits, resulting in partial data loss.
istime(time('01:11:21.1234', 4), 2)
is False since the precision for time is 4 and the decimal fractional seconds contain 4 digits, but the precision for istime is 2, resulting in partial data loss.
Last modified date: 01/27/2026