Skip to main content

Python Time and Date

Body

In this tutorial you will learn:

  • Dates in Python
  • Time in Python
  • Converting datetime object to string
  • Calendar in Python

Dates in Python

In Python there are classes that gives us functions to manipulate dates and time. There are certain modules that are provided by Python and in order to bring those modules into our code we need to use import statements. These modules are called classes and they are containers that contain different functions. In order to work with date and time we need to import datetime function from date class.

from datetime import date

Creating a

Comments

Submitted bySahana S.J (not verified)on Sat, 08/07/2021 - 14:11

boring

Add new comment

Screenshot