Converting a string to a datetime
Read
5 min read
The datetime.strptime class method can parse a date/time string into a datetime object.
Read
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
Converting datetime to UTC
Read
1 min read
Need to convert a datetime object to UTC time? Use the astimezone method!
Read
Continue exploring
Learn something new about Python
My name is Trey Hunner. I publish new Python articles and screencasts through Python Morsels. If you want to keep learning new things about Python, join Python Morsels!