How to Display Current Date in Python


In this example, we will learn how to display the current date in Python.

Source Code

import datetime

a = datetime.datetime.now()
print(a)

Output:

2020-06-28 08:47:53.885494
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
Advertisement