Date and time data types

Exasol supports the DATE and TIMESTAMP(p) data types from the SQL standard. Additionally, the data type TIMESTAMP(p) WITH LOCAL TIME ZONE can be used to handle timestamps in the session time zone. For more information, see ALTER SESSION and SESSIONTIMEZONE.

Data type Range Note

DATE

0001-01-01 to 9999-12-31

 

TIMESTAMP(p)

0001-01-01 00:00:00.000000000 to 9999-12-31 23:59:59.999999999

Timestamp without time zone.

p = fractional seconds precision (optional)

0 ≤ p ≤ 9, default = 3

The fractional seconds precision p is given as the number of decimals used to store fractional seconds. For example, 3 means millisecond precision.

TIMESTAMP(p) WITH LOCAL TIME ZONE

0001-01-01 00:00:00.000000000 to 9999-12-31 23:59:59.999999999

Timestamp considering the session time zone. If the session time zone is not set to UTC, the usable range is slightly smaller because all timestamps must be within this range in both the session time zone and UTC.

p = fractional seconds precision (optional)

0 ≤ p ≤ 9, default = 3

The fractional seconds precision p is given as the number of decimals used to store fractional seconds. For example, 3 means millisecond precision.