In this example we will show how to get information about the date object in Python.
Source Code
import datetime
a = datetime.datetime.now()
print(a.year)
print(a.month)
print(a.strftime("%B"))
print(a.day)
Output:
2020
6
June
28
In this example we will show how to get information about the date object in Python.
import datetime
a = datetime.datetime.now()
print(a.year)
print(a.month)
print(a.strftime("%B"))
print(a.day)
Output:
2020
6
June
28