import datetime newyr = datetime.date(2005, 01, 01) print newyr.year # the year property print newyr.strftime("%B %d, %Y") # the strftime method print newyr