Skip to main content
Loading page…
Python Mastery
Chapter 22
Lesson 2 of 5
Dates & Times (datetime)
Contents
Notes
Tutor
Concept
The datetime Module — Four Key Types
Loading activity…
Previous
1 / 7
Continue
Contents
Notes
Discussion
Tutor
25 min
7 activities
0 of 7 done
In this lesson
1
The datetime Module — Four Key Types
2
Date Arithmetic with timedelta
3
Timezones with zoneinfo (Python 3.9+)
4
Quick Check: strptime Format
5
Pitfall: datetime.utcnow() Returns a Naive Datetime
6
Practice: Age Calculator
7
Reflection: Naive vs Aware
Objectives
Learner can create and manipulate date, time, and datetime objects
Learner can format and parse dates with strftime and strptime
Learner can perform date arithmetic using timedelta
Learner can work with timezone-aware datetimes using zoneinfo
Chapter 22 · The Standard Library Toolkit
Regular Expressions (re)
Dates & Times (datetime)
Logging Like a Pro
Config & Environment Variables
collections, math, random & more
Previous: Regular Expressions (re)
Next: Logging Like a Pro