How to Create a Date in Python


In this example we will show how to create a date in Python.

Source Code

import datetime

a = datetime.datetime(2020, 6, 28)

print(a)

Output:

2020-06-28 00:00:00
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments