What is the difference between `DATETIME` and `TIMESTAMP` in MySQL?

Advanced SQL Developer Medium

Advanced SQL Developer — Medium

What is the difference between `DATETIME` and `TIMESTAMP` in MySQL?

Key points

  • TIMESTAMP stores values in UTC and converts to session timezone
  • DATETIME does not have timezone awareness
  • TIMESTAMP has a range of 1970–2038; DATETIME supports 1000–9999

Ready to go further?

Related questions