TIME represents a time of day without a date. ScyllaDB stores it as a 64-bit signed integer counting nanoseconds since midnight, while accepting readable ISO-8601-style values such as 21:07:12.123. section 4.3
Insert TIME values as strings or their underlying integer representation. When queried, cqlsh formats them with nanosecond precision and validates values when using the native type. section 4.3.1
Insert and query a time
INSERT INTO BASIC(text, timestamp, date, time) VALUES ('time', '2023-06-25 10:31:00+0000', '2023-06-25', '10:31:00'); A query returns the TIME value as 10:31:00.000000000. section 4.3.1
Table 4.6 Table times
|
Type
|
Stored as
|
Acceptable forms
|
|---|---|---|
TIMESTAMP
|
BIGINT representing the number of milliseconds since the Unix epoch (1970-01-01 00:00:00+0000)
|
1687654894759,
'2023-06-24 21:02:00+0000' and other ISO-8601 compliant timestamps
|
DATE
|
32-bit unsigned integer representing the number of days since the Unix epoch (1970-01-01), with the epoch in the center of the range (2^31)
|
'2023-06-24',
641
|
TIME
|
64-bit signed integer representing the number of nanoseconds since midnight
|
'21:07:12.123' with either second, millisecond, microsecond, or nanosecond precision,
76032123000
|
DURATION
|
Three integers representing the number of months, the number of days, and the number of nanoseconds
|
1y4mo3w5d3h6m19s400ms20us141ns or any combination of the units
|
Compare TIME with TIMESTAMP, DATE, and DURATION by storage format and acceptable input forms. section 4.3

