Chapter 9. Date and Time Values

When beginning to program database-oriented applications, it is not uncommon to focus on processing data and to forget about matters of time and timing. If a program is simply storing addresses or otherwise dealing with data that is not naturally time-sensitive, it is easy to overlook matters of date and time. However, storing date and time for data and activity on the server allows for several desiderata, some of which are:

  • Rolling back documents to an earlier draft version without affecting the current draft
  • Figuring out why a process or subprocess jammed up or failed
  • Forensic analysis of a compromised server

In this chapter, we will see:

  • What data types MySQL supports for date and time
  • When to use which data type and ...

Get MySQL for Python now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.