import datetime dt = datetime.datetime.today() print dt.yearOutput2016 print dt.monthOutput8 print dt.dayOutput22