Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

1
  • 2
    It's trivial to pack a date into three bytes. The range 0000~9999 requires 14 bits, 01~12 requires 4 bits, and 01~31 requires 5 bits, for a sum of 23 bits. By using also the remaining bit in a three-byte quantity, you can represent dates over a period of 32,768 years maintaining a one-day resolution. This could be used, for example, to allow representing dates in the range year 8191 BC through 24576 AD. By packing the bits as, say, yyyyyyyyyyyyyyymmmmddddd, the decimal representation remains directly comparable (though not directly human readable, but who cares in database physical storage?). Commented Sep 27, 2018 at 18:57