demo_datetime2.py:
import datetime x = datetime.datetime.now() print(x.year) print(x.strftime("%A"))
C:\Users\My Name>python demo_datetime2.py