Working with Dates and Times in Python
The datetime module provides classes for working with dates and times. It's essential for tasks like logging, scheduling, calculating durations, or displaying formatted dates.
We'll cover the main classes (date, time, datetime, timedelta), formatting/parsing, arithmetic, and timezones.
Importing and Basic Objects
Creating Specific Dates/Times
Formatting with strftime
Convert datetime objects to strings with custom format.
Parsing with strptime
Date Arithmetic with timedelta
Quick Quiz
Wir haben die Materialien überprüft, dennoch können Fehler vorkommen. Der Inhalt dient ausschließlich Bildungszwecken, daher verwende ihn auf eigene Verantwortung und überprüfe ihn bei Bedarf mit anderen Quellen.
✨ Frag Lara — deine KI-Lernpartnerin
Entsperre personalisierte Lernunterstützung. Lara kann Lektionen erklären, Themen zusammenfassen und deine Lernfragen beantworten — verfügbar ab dem Go-Tarif.
Lara hilft dir, schneller zu lernen — exklusiv für ReadyTools Go-, Plus- und Max-Mitglieder.

