PlanetScale

Datetimes versus timestamps in MySQL

Jun 22, 2023Aaron Francis
Datetimes versus timestamps in MySQL
SummaryAI, from the source post

This post details the differences between MySQL's DATE, DATETIME, TIMESTAMP, YEAR, and TIME column types. It explains their storage requirements, legal ranges, and specific use cases. A key focus is the distinction between DATETIME and TIMESTAMP, particularly the '2038 problem' for TIMESTAMP and how TIMESTAMP handles timezones by converting to/from UTC, while DATETIME does not.

More from the MySQL Database Design Best Practices trail