Date/DateTime before 1970 and after 2038

330 views
Skip to first unread message

Tobia

unread,
Mar 8, 2017, 7:21:15 AM3/8/17
to ClickHouse
Have you discussed any plans to add new Date and DateTime types, to store dates before 1970 and after 2038?

What would be the best way to store these types? I'm thinking:
  • Date32 = a signed Int32 of days before/after 1970-01-01, for easy conversion to/from Date (same integer value)
  • DateTime64 (or Timestamp) = a signed Int64 of microseconds before/after 1970-01-01, exactly wrapping Poco.TimeVal, and for easy conversion to/from DateTime (just multiply/divide by 1,000,000)
What do you think?

-Tobia

Pavel Artemkin

unread,
Mar 9, 2017, 6:28:10 AM3/9/17
to ClickHouse
Currently we don't have any plans to add such types. As workaround you can store parts of date into separated columns.


среда, 8 марта 2017 г., 17:21:15 UTC+5 пользователь Tobia написал:
Reply all
Reply to author
Forward
0 new messages