Skip to content

Time ​

Time represents signed whole seconds without a calendar date or timezone. It can describe a clock value or an elapsed duration, including negative values and durations longer than one day.

Syntax ​

text
Time

Input and range ​

Numeric input is a number of seconds. Text input uses a clock representation such as '12:30:00' or '-01:02:03'. Hours may exceed 23. Minute and second components are normalized, so '25:70:70' becomes '26:11:10'.

The numeric value must fit signed 32-bit seconds. Text display saturates at 999:59:59 in either direction; numeric casts and comparisons preserve the actual stored seconds. Timezone parameters are not accepted.

Adding a Time to a Date produces a UTC timestamp. Subtracting clocks produces an exact Decimal number of seconds. Use Time64 for fractional seconds.

Examples ​

Reading durations ​

sql
SELECT CAST('25:70:70' AS Time), CAST('-01:02:03' AS Time)
FORMAT csv;
text
"26:11:10","-01:02:03"

Converting seconds ​

sql
SELECT CAST(3723 AS Time), CAST(CAST('01:02:03' AS Time) AS INTEGER)
FORMAT csv;
text
"01:02:03",3723

Combining a date and a clock ​

sql
SELECT CAST('2025-03-05' AS Date) + CAST('12:30:00' AS Time)
FORMAT csv;
text
"2025-03-05 12:30:00"