What is the datetime data type good for in Python?

Experience Level: Junior
Tags: Python

Answer

The datetime module supplies classes for manipulating dates and times.

The datetime module contains class datetime that represents date and time.

This data type can be used for manipulating date and time, returning date, time, or individual parts, replace date and time parts, read time zone and more.
Python for beginners
Python for beginners

Are you learning Python ? Try our test we designed to help you progress faster.

Test yourself