Name Description

Date Store a date in the database as an ISO86OI date, used for his torical (pre-1000 A.D.) or partial dates (for example, only a year and no day or month). This field type should be avoided otherwise, as it's extremely expensive to sort and perform conversions on this style of date.

Datestamp Datestamp field types are stored using the common Unix time-stamp format containing the number of seconds since January 1, 1970. As such, these have a limited date range available (1901 A.D.-2038 A.D. on most systems) but are quick to calculate time zone offsets and sort in listings. A legacy format, Datestamps are supported across all database systems.

Datetime Datetime field types are stored using the database system's internal "datetime" format for date handling. It has the advantage of being able to use database-specific functions for date handling, including ease of extracting a single part of the date, but with the caveat of inconsistent support across database systems.

For much, much more than you ever wanted to know about the pros and cons of various date storage formats, there's an interesting discussion on the Events working group at

Because the Aurora Book Club has no intention of moving from MySQL, and all dates will be well within "normal" ranges, we will be using the Datetime field type for our site.

Was this article helpful?

0 0

Post a comment