KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums kdb+ What is the implementation of the deprecated DateTime datatype?

  • What is the implementation of the deprecated DateTime datatype?

    Posted by MilanGill on February 26, 2025 at 10:40 am

    The deprecated DateTime data type has the tag value -15. The suggested alternative is the Timestamp data type, which has tag value -12. In both cases, the following documentation page states that the size is 8 bytes.

    https://code.kx.com/q/basics/datatypes/

    However, on this documentation page

    Data types | Basics | kdb+ and q documentation – kdb+ and q documentation

    the following is stated:

    The 4-byte datetime datatype (15) is deprecated in favour of the 8-byte timestamp datatype (12).

    Internally, dates, times and timestamps are represented by integers:

    This suggests that the deprecated DateTime datatype is a 4 byte integer.

    On another documentation page

    2. Basic Data Types – Atoms – Q for Mortals

    the following is written.

    A datetime value stores in a float the fractional day count from midnight Jan 1, 2000.

    Combining this with the above, it is unclear as to whether the deprecated Datetime (-15) type is a 4 byte or 8 byte floating point value.

    Is anyone able to clarify?

    MilanGill replied 4 days, 15 hours ago 2 Members · 2 Replies
  • 2 Replies

Log in to reply.