demo_datetime_strftime_y2.py:
x = datetime.datetime.now() print(x.strftime("%Y"))
C:\Users\My Name>python demo_datetime_strftime_y2.py