01
Converting a string to a datetime
Read
4 min read
The datetime.strptime class method can parse a date/time string into a datetime object.
Read
02
datetime arithmetic
Read
7 min read
Premium
Python's datetime and timedelta objects support many types of arithmetic for shifting moments in time and scaling durations of time.
Read
03
Converting datetime to UTC
Read
1 min read
Need to convert a datetime object to UTC time? Use the astimezone method!
Read
My name is Trey Hunner. I publish new Python articles and screencasts every week through Python Morsels. If you want to learn something new about Python every week, join Python Morsels!