Skip to main content

Time

The TIME and TIMETZ types specify the hour, minute, second, microsecond of a day.

NameAliasesDescription
TIMETIME WITHOUT TIME ZONETime of day
TIMETZTIME WITH TIME ZONETime of day, with time zone offset
TIME_NSTime of day, nanosecond precision

Instances can be created using the type names as a keyword, where the data must be formatted according to the ISO 8601 format (hh:mm:ss[.zzzzzz[zzz]][+-TT[:tt]]).

Query
SELECT TIME '1992-09-20 11:30:00.123456';
Result
 time----------------- 11:30:00.123456
Query
SELECT TIMETZ '1992-09-20 11:30:00.123456';
Result
 time with time zone----------------------- 11:30:00.123456+00:00
Query
SELECT TIMETZ '1992-09-20 11:30:00.123456-02:00';
Result
 time with time zone----------------------- 13:30:00.123456+00:00
Query
SELECT TIMETZ '1992-09-20 11:30:00.123456+05:30';
Result
 time with time zone----------------------- 06:00:00.123456+00:00
Query
SELECT '15:30:00.123456789'::TIME_NS;
Result
 time_ns-------------------- 15:30:00.123456789

TIME_NS values can also be read from Parquet when the type is TIME with unit NANOS.