🎓 EASYTUTORGUIDE · Complete Python Course

Very beginner → professional Python · 60 chapters · 900 topics

EasyTutorGuide

Chapter 29: Dates, Time and Scheduling

Complete Python lesson for very beginners. Technical words are explained in simple language, and every outline topic includes a practical example, expected output, steps, and practice.

Python CourseVery Beginner Friendly15 TopicsExamples + Output20 Q&A
Chapter 29 · 15 topics
100%

Chapter Overview

This Python tutorial chapter covers Dates, Time and Scheduling through 15 connected topics. Work through the examples in order, check the expected output, and complete the practice after each topic.

  • 29.1 datetime
  • 29.2 Dates
  • 29.3 Times
  • 29.4 Date-Time Objects
  • 29.5 Formatting Dates
  • Plus 10 additional Python topics in this chapter.

29.1 datetime

datetime is part of Dates, Time and Scheduling. In simple language, it means a Python idea used while learning dates, time and scheduling.

It is one building block of dates, time and scheduling and helps you write clearer, more predictable Python programs. For a very beginner, focus first on what goes in, what Python does, and what comes out; details become easier after you run a small example.

Technical words in simple language: datetime (a Python idea used while learning dates, time and scheduling).

Python / Practical Example

from datetime import datetime
now = datetime(2026, 9, 21, 10, 30)
print(now.year, now.month, now.day)

Expected Output

2026 9 21

Step-by-Step Explanation

  1. Import datetime.
  2. Create a known date-time value.
  3. Read individual fields such as year, month, and day.
Practice: Re-type the example for “datetime”, change one safe input, predict the result before running it, and explain in one sentence why the result changed.

29.2 Dates

Dates is part of Dates, Time and Scheduling. In simple language, it means a Python idea used while learning dates, time and scheduling.

It is one building block of dates, time and scheduling and helps you write clearer, more predictable Python programs. For a very beginner, focus first on what goes in, what Python does, and what comes out; details become easier after you run a small example.

Technical words in simple language: Dates (a Python idea used while learning dates, time and scheduling).

Python / Practical Example

from datetime import date
print(date(2026,9,21))

Expected Output

2026-09-21

Step-by-Step Explanation

  1. Read the example from top to bottom.
  2. Identify the value, object, or operation related to this topic.
  3. Change one small input and predict the result before running it.
Practice: Re-type the example for “Dates”, change one safe input, predict the result before running it, and explain in one sentence why the result changed.

29.3 Times

Times is part of Dates, Time and Scheduling. In simple language, it means a Python idea used while learning dates, time and scheduling.

It is one building block of dates, time and scheduling and helps you write clearer, more predictable Python programs. For a very beginner, focus first on what goes in, what Python does, and what comes out; details become easier after you run a small example.

Technical words in simple language: Times (a Python idea used while learning dates, time and scheduling).

Python / Practical Example

from datetime import date
print(date(2026,9,21))

Expected Output

2026-09-21

Step-by-Step Explanation

  1. Read the example from top to bottom.
  2. Identify the value, object, or operation related to this topic.
  3. Change one small input and predict the result before running it.
Practice: Re-type the example for “Times”, change one safe input, predict the result before running it, and explain in one sentence why the result changed.

29.4 Date-Time Objects

Date-Time Objects is part of Dates, Time and Scheduling. In simple language, it means a value with data and behavior.

It is one building block of dates, time and scheduling and helps you write clearer, more predictable Python programs. For a very beginner, focus first on what goes in, what Python does, and what comes out; details become easier after you run a small example.

Technical words in simple language: Date-Time Objects (a value with data and behavior).

Python / Practical Example

from datetime import date
print(date(2026,9,21))

Expected Output

2026-09-21

Step-by-Step Explanation

  1. Read the example from top to bottom.
  2. Identify the value, object, or operation related to this topic.
  3. Change one small input and predict the result before running it.
Practice: Re-type the example for “Date-Time Objects”, change one safe input, predict the result before running it, and explain in one sentence why the result changed.

29.5 Formatting Dates

Formatting Dates is part of Dates, Time and Scheduling. In simple language, it means a Python idea used while learning dates, time and scheduling.

It is one building block of dates, time and scheduling and helps you write clearer, more predictable Python programs. For a very beginner, focus first on what goes in, what Python does, and what comes out; details become easier after you run a small example.

Technical words in simple language: Formatting Dates (a Python idea used while learning dates, time and scheduling).

Python / Practical Example

from datetime import date
print(date(2026,9,21))

Expected Output

2026-09-21

Step-by-Step Explanation

  1. Read the example from top to bottom.
  2. Identify the value, object, or operation related to this topic.
  3. Change one small input and predict the result before running it.
Practice: Re-type the example for “Formatting Dates”, change one safe input, predict the result before running it, and explain in one sentence why the result changed.

29.6 Parsing Dates

Parsing Dates is part of Dates, Time and Scheduling. In simple language, it means a Python idea used while learning dates, time and scheduling.

It is one building block of dates, time and scheduling and helps you write clearer, more predictable Python programs. For a very beginner, focus first on what goes in, what Python does, and what comes out; details become easier after you run a small example.

Technical words in simple language: Parsing Dates (a Python idea used while learning dates, time and scheduling).

Python / Practical Example

from datetime import date
print(date(2026,9,21))

Expected Output

2026-09-21

Step-by-Step Explanation

  1. Read the example from top to bottom.
  2. Identify the value, object, or operation related to this topic.
  3. Change one small input and predict the result before running it.
Practice: Re-type the example for “Parsing Dates”, change one safe input, predict the result before running it, and explain in one sentence why the result changed.

29.7 timedelta

timedelta is part of Dates, Time and Scheduling. In simple language, it means a Python idea used while learning dates, time and scheduling.

It is one building block of dates, time and scheduling and helps you write clearer, more predictable Python programs. For a very beginner, focus first on what goes in, what Python does, and what comes out; details become easier after you run a small example.

Technical words in simple language: timedelta (a Python idea used while learning dates, time and scheduling).

Python / Practical Example

from datetime import date, timedelta
d = date(2026, 9, 21)
print(d + timedelta(days=7))

Expected Output

2026-09-28

Step-by-Step Explanation

  1. Create a date.
  2. Create a seven-day duration.
  3. Add the duration to the date.
Practice: Re-type the example for “timedelta”, change one safe input, predict the result before running it, and explain in one sentence why the result changed.

29.8 Time Zones

Time Zones is part of Dates, Time and Scheduling. In simple language, it means a Python idea used while learning dates, time and scheduling.

It is one building block of dates, time and scheduling and helps you write clearer, more predictable Python programs. For a very beginner, focus first on what goes in, what Python does, and what comes out; details become easier after you run a small example.

Technical words in simple language: Time Zones (a Python idea used while learning dates, time and scheduling).

Python / Practical Example

from datetime import datetime, timezone
now = datetime(2026, 9, 21, 12, 0, tzinfo=timezone.utc)
print(now.isoformat())

Expected Output

2026-09-21T12:00:00+00:00

Step-by-Step Explanation

  1. Create an aware datetime with UTC.
  2. Time-zone-aware values carry offset information.
  3. isoformat() produces a standard text representation.
Practice: Re-type the example for “Time Zones”, change one safe input, predict the result before running it, and explain in one sentence why the result changed.

29.9 UTC

UTC is part of Dates, Time and Scheduling. In simple language, it means a Python idea used while learning dates, time and scheduling.

It is one building block of dates, time and scheduling and helps you write clearer, more predictable Python programs. For a very beginner, focus first on what goes in, what Python does, and what comes out; details become easier after you run a small example.

Technical words in simple language: UTC (a Python idea used while learning dates, time and scheduling).

Python / Practical Example

from datetime import datetime, timezone
now = datetime(2026, 9, 21, 12, 0, tzinfo=timezone.utc)
print(now.isoformat())

Expected Output

2026-09-21T12:00:00+00:00

Step-by-Step Explanation

  1. Create an aware datetime with UTC.
  2. Time-zone-aware values carry offset information.
  3. isoformat() produces a standard text representation.
Practice: Re-type the example for “UTC”, change one safe input, predict the result before running it, and explain in one sentence why the result changed.

29.10 zoneinfo

zoneinfo is part of Dates, Time and Scheduling. In simple language, it means a Python idea used while learning dates, time and scheduling.

It is one building block of dates, time and scheduling and helps you write clearer, more predictable Python programs. For a very beginner, focus first on what goes in, what Python does, and what comes out; details become easier after you run a small example.

Technical words in simple language: zoneinfo (a Python idea used while learning dates, time and scheduling).

Python / Practical Example

from datetime import datetime, timezone
now = datetime(2026, 9, 21, 12, 0, tzinfo=timezone.utc)
print(now.isoformat())

Expected Output

2026-09-21T12:00:00+00:00

Step-by-Step Explanation

  1. Create an aware datetime with UTC.
  2. Time-zone-aware values carry offset information.
  3. isoformat() produces a standard text representation.
Practice: Re-type the example for “zoneinfo”, change one safe input, predict the result before running it, and explain in one sentence why the result changed.

29.11 Unix Timestamps

Unix Timestamps is part of Dates, Time and Scheduling. In simple language, it means a Python idea used while learning dates, time and scheduling.

It is one building block of dates, time and scheduling and helps you write clearer, more predictable Python programs. For a very beginner, focus first on what goes in, what Python does, and what comes out; details become easier after you run a small example.

Technical words in simple language: Unix Timestamps (a Python idea used while learning dates, time and scheduling).

Python / Practical Example

from datetime import date
print(date(2026,9,21))

Expected Output

2026-09-21

Step-by-Step Explanation

  1. Read the example from top to bottom.
  2. Identify the value, object, or operation related to this topic.
  3. Change one small input and predict the result before running it.
Practice: Re-type the example for “Unix Timestamps”, change one safe input, predict the result before running it, and explain in one sentence why the result changed.

29.12 Measuring Time

Measuring Time is part of Dates, Time and Scheduling. In simple language, it means a Python idea used while learning dates, time and scheduling.

It is one building block of dates, time and scheduling and helps you write clearer, more predictable Python programs. For a very beginner, focus first on what goes in, what Python does, and what comes out; details become easier after you run a small example.

Technical words in simple language: Measuring Time (a Python idea used while learning dates, time and scheduling).

Python / Practical Example

from datetime import date
print(date(2026,9,21))

Expected Output

2026-09-21

Step-by-Step Explanation

  1. Read the example from top to bottom.
  2. Identify the value, object, or operation related to this topic.
  3. Change one small input and predict the result before running it.
Practice: Re-type the example for “Measuring Time”, change one safe input, predict the result before running it, and explain in one sentence why the result changed.

29.13 time Module

time Module is part of Dates, Time and Scheduling. In simple language, it means a Python file that can provide reusable code.

It is one building block of dates, time and scheduling and helps you write clearer, more predictable Python programs. For a very beginner, focus first on what goes in, what Python does, and what comes out; details become easier after you run a small example.

Technical words in simple language: time Module (a Python file that can provide reusable code).

Python / Practical Example

import math
print(math.sqrt(81))

Expected Output

9.0

Step-by-Step Explanation

  1. import makes a module available.
  2. Use module.name to access its contents.
  3. The standard-library math module provides sqrt().
Practice: Re-type the example for “time Module”, change one safe input, predict the result before running it, and explain in one sentence why the result changed.

29.14 Calendar Operations

Calendar Operations is part of Dates, Time and Scheduling. In simple language, it means a Python idea used while learning dates, time and scheduling.

It is one building block of dates, time and scheduling and helps you write clearer, more predictable Python programs. For a very beginner, focus first on what goes in, what Python does, and what comes out; details become easier after you run a small example.

Technical words in simple language: Calendar Operations (a Python idea used while learning dates, time and scheduling).

Python / Practical Example

from datetime import date
print(date(2026,9,21))

Expected Output

2026-09-21

Step-by-Step Explanation

  1. Read the example from top to bottom.
  2. Identify the value, object, or operation related to this topic.
  3. Change one small input and predict the result before running it.
Practice: Re-type the example for “Calendar Operations”, change one safe input, predict the result before running it, and explain in one sentence why the result changed.

29.15 Scheduling Concepts

Scheduling Concepts is part of Dates, Time and Scheduling. In simple language, it means a Python idea used while learning dates, time and scheduling.

It is one building block of dates, time and scheduling and helps you write clearer, more predictable Python programs. For a very beginner, focus first on what goes in, what Python does, and what comes out; details become easier after you run a small example.

Technical words in simple language: Scheduling Concepts (a Python idea used while learning dates, time and scheduling).

Python / Practical Example

from datetime import date
print(date(2026,9,21))

Expected Output

2026-09-21

Step-by-Step Explanation

  1. Read the example from top to bottom.
  2. Identify the value, object, or operation related to this topic.
  3. Change one small input and predict the result before running it.
Practice: Re-type the example for “Scheduling Concepts”, change one safe input, predict the result before running it, and explain in one sentence why the result changed.

Common Beginner Mistakes

  • Copying code without predicting what each line does.
  • Ignoring the first useful error message or traceback location.
  • Mixing tabs/spaces or changing indentation accidentally.
  • Using data of the wrong type for an operation.
  • Trying to learn many advanced variations before mastering one small working example.

Chapter Practice

  1. Choose three topics from this chapter and re-type their examples without copying and pasting.
  2. For each example, change one input and predict the output first.
  3. Explain five technical terms from this chapter in your own beginner-friendly words.
  4. Create one small program that combines at least two chapter topics.
  5. Keep notes about errors you made and what fixed them.

Mini Project / Challenge

Create a small Python exercise that combines at least three ideas from Dates, Time and Scheduling. Start with a tiny working version, test it, then improve it one step at a time.

  1. Choose three topics from this chapter.
  2. Write or adapt a small Python example using those topics.
  3. Predict the output before running the code.
  4. Test at least one different input.
  5. Write two sentences explaining what the program does and what you learned.

20 Questions & Answers

1. What is the main goal of Chapter 29?

The goal is to understand dates, time and scheduling through small explanations, examples, and practice.

2. Should I memorize every command or method?

No. Understand the pattern, practice the common form, and learn how to read documentation when you need exact details.

3. Why are the examples small?

Small examples isolate one idea at a time, which makes errors easier to understand and fix.

4. What should I do when an example gives an error?

Read the last part of the traceback, check spelling and indentation, confirm the required package or file exists, and compare the input types with what the operation expects.

5. Why should I predict output before running code?

Prediction forces you to reason about the program instead of only copying it.

6. What should I remember about datetime?

Remember its beginner meaning, the problem it helps solve, the shape of a small example, and one common situation where it is appropriate.

7. What should I remember about Dates?

Remember its beginner meaning, the problem it helps solve, the shape of a small example, and one common situation where it is appropriate.

8. What should I remember about Times?

Remember its beginner meaning, the problem it helps solve, the shape of a small example, and one common situation where it is appropriate.

9. What should I remember about Date-Time Objects?

Remember its beginner meaning, the problem it helps solve, the shape of a small example, and one common situation where it is appropriate.

10. What should I remember about Formatting Dates?

Remember its beginner meaning, the problem it helps solve, the shape of a small example, and one common situation where it is appropriate.

11. What should I remember about Parsing Dates?

Remember its beginner meaning, the problem it helps solve, the shape of a small example, and one common situation where it is appropriate.

12. What should I remember about timedelta?

Remember its beginner meaning, the problem it helps solve, the shape of a small example, and one common situation where it is appropriate.

13. What should I remember about Time Zones?

Remember its beginner meaning, the problem it helps solve, the shape of a small example, and one common situation where it is appropriate.

14. What should I remember about UTC?

Remember its beginner meaning, the problem it helps solve, the shape of a small example, and one common situation where it is appropriate.

15. What should I remember about zoneinfo?

Remember its beginner meaning, the problem it helps solve, the shape of a small example, and one common situation where it is appropriate.

16. What should I remember about Unix Timestamps?

Remember its beginner meaning, the problem it helps solve, the shape of a small example, and one common situation where it is appropriate.

17. What should I remember about Measuring Time?

Remember its beginner meaning, the problem it helps solve, the shape of a small example, and one common situation where it is appropriate.

18. What should I remember about time Module?

Remember its beginner meaning, the problem it helps solve, the shape of a small example, and one common situation where it is appropriate.

19. What should I remember about Calendar Operations?

Remember its beginner meaning, the problem it helps solve, the shape of a small example, and one common situation where it is appropriate.

20. What should I remember about Scheduling Concepts?

Remember its beginner meaning, the problem it helps solve, the shape of a small example, and one common situation where it is appropriate.