Comment on page
Values for the datetime types are internally stored and manipulated as
int64values. From the perspective of core TileDB internally, the datetime datatypes are simply aliases for
The meaning of an integral datetime value depends on three things:
- 1.A reference date. TileDB fixes this to the UNIX epoch time (1970-01-01 at 12:00 am). This is not currently configurable.
- 2.A unit of time. For example: day, month, hour, or nanosecond.
- 3.An integer value. This the integer number of time units relative to the reference date.
For example, a value of
10for the type
TILEDB_DATETIME_DAYrefers to 12:00 am on 1970-01-10. A value of
-18for the type
TILEDB_DATETIME_HRrefers to 6:00 am on 1969-12-31, or
1969-12-31T06:00Zin ISO8601 format.
This means that each date unit of datetime is capable of representing a different range of dates at different resolutions. The following table (values taken from the Numpy np.datetime64 documentation) summarizes each date unit’s relative and absolute range: