datetimenumbers
Datetimenumbers are numeric representations that encode date and time information in digital systems. They provide a compact, machine-friendly way to store, compare, sort, and perform arithmetic on temporal data, especially when values are normalized to a single time zone, typically Coordinated Universal Time (UTC).
- Unix time (POSIX time): integer or floating point seconds since 1970-01-01 UTC, sometimes with subsecond precision
- Windows FILETIME: 100-nanosecond intervals since 1601-01-01.
- Excel serial date numbers: a floating point value where the integer part counts days from a base
- Julian day numbers and Julian dates: continuous counts of days used in astronomy.
- High-resolution timestamps in databases often store milliseconds or nanoseconds since the epoch.
Advantages of datetimenumbers include efficient storage, fast numeric comparisons and indexing, and straightforward arithmetic such as
Common pitfalls involve time zones and daylight saving adjustments, leap seconds, and portability issues like 32-bit
They are used in logging, scheduling, event ordering, analytics, and data interoperability. Implementations typically provide libraries