strftime() in Python
################## Date time in python using strftime() ################
import datetime
#import date
today = datetime.datetime.now()
#accessing the year attribute
year1 = today.month
print(year1)
#using the strftime() method
year2 = today.strftime("%Y")
print(year2)
#using the strftime() method
mo = today.strftime("%m")
print(mo)
date_formatted = today.strftime('%m/%d/%Y')
print('Full Date:'+ date_formatted)










