O'Reilly logo

MySQL for Python by Albert Lukaszewski, PhD

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required