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