Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Treehouse

Python Dates and Times Course (How To)

via Treehouse

Overview

As a Python developer, you will inevitably come across the need to use dates and times in your projects. This course will teach you how to use Python to work with dates and times. You will learn how to manipulate and format dates, calculate time differences, and explore the built-in datetime module. By the end of this course, you will have a solid understanding of how to handle dates and times in Python for a variety of applications. Throughout this course, we'll work together to build a simple app that will utilize this new concept and solidify your understanding.

Syllabus

Introduction

This stage provides a foundational understanding of time in the digital world. You'll explore how computers interpret time through concepts like UTC time and the Unix timestamp. Additionally, you'll get a glimpse of the two projects you'll tackle in this course: the Birthday App and the Time Tracker, setting the stage for the practical applications of your newfound knowledge in Python's date and time handling.

Chevron 3 steps
  • How Computers Work With Time

    3:20

  • Computers and Time

    4 questions

  • What you’ll be learning and building

    4:09

Date and Time Basics

In this stage, we dive deep into Python's datetime module. You'll learn about time, date, and datetime objects, formatting, parsing, timedelta, and the powerful relativedelta module. Explore the fundamentals of date and time manipulation in Python.

Chevron 12 steps
  • Time

    2:52

  • datetime time

    5 questions

  • Date

    4:43

  • datetime date

    5 questions

  • Datetime

    5:18

  • datetime datetime

    5 questions

  • Parse and Format Time

    6:34

  • strptime and strftime

    4 questions

  • Timedelta

    7:16

  • datetime timedelta

    5 questions

  • Relativedelta

    6:16

  • dateutil relativedelta

    4 questions

The Birthday App

In this stage, you'll master datetime functions while building the Birthday App. You'll tour the app's structure, calculate ages, and differences between birthdays, and display upcoming ones, all with Python's datetime capabilities.

Chevron 6 steps
  • How the app works

    6:26

  • Display the age

    6:22

  • Display the age difference

    7:09

  • Upcoming birthdays

    7:49

  • Recap

    4 questions

  • instruction

    Challenge yourself

The Time Tracker

Explore the Time Tracker App's structure and focus on datetime related functions in this stage. Master time tracking, client data processing, and date range filtering for data analysis.

Chevron 7 steps
  • How the app works

    3:36

  • Start and stop tracking

    4:43

  • Total hours by client

    7:56

  • Filter by date range

    10:36

  • Filter by last X days

    8:20

  • Recap

    3 questions

  • instruction

    Challenge Yourself!

Taught by

Rachel Johnson

Reviews

Start your review of Python Dates and Times Course (How To)

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.