Using Python's datetime Module

Python has several different modules to deal with dates and times. This course concentrates on the primary one, datetime. Dates and times are messy things! Shifts due to daylight savings time and time zones complicate any computing with dates and times.

In this course, you’ll tackle that messiness and learn:

  • How to use the datetime module
  • What the zoneinfo module does and how to use it
  • How to calculate the difference between two datetime objects

What’s Included:

Downloadable Resources:

Related Learning Paths:

About Christopher Trudeau

Christopher has a passion for the Python language and writes for Real Python. He is a consultant who helps advise organizations on how to improve their technical teams.

» More about Christopher

Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:

← Browse All Courses