Timestamp data types are used to store and process precise time information. RisingWave supports two types of timestamps:Documentation Index
Fetch the complete documentation index at: https://risingwavelabs-wyx-add-timestamp-dedicated-page.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
-
timestamp: Stores date and time values without timezone, supporting up to nanosecond precision (9 digits after the decimal point). -
timestamptz: Stores date and time values along with time zone information, supporting up to microsecond precision (6 digits after the decimal point).
Precision preservation
Added in version 2.1.
timestamp during the following operations:
- Reading from or writing to external sources (Kafka, Iceberg, Parquet, etc.) preserves nanoseconds automatically.
-
Adding or subtracting an interval from a timestamp.
Add an intervalSubtract an interval
Precision loss
Nanosecond precision is lost (truncated to microseconds or discarded) under the following scenarios:-
Converting timestamp to types with lower precision:
- timestamptz
- time
- date
-
Subtracting Timestamps (timestamp - timestamp): The result is an interval, which only has microsecond precision.
Subtract two timestamps