Print Date Time in Python


In this tutorial, you will learn to print date time in python. You need to import datetime library. The program to print date time is so simple, you can read the code as follows.

# Created by inpows
# Visit for more python tutorials

import datetime

nowDateTime =

print("Current Date and Time: ", nowDateTime.strftime("%Y-%m-%d %H:%M:%S"))
Back To Top