def print_datetime_object ( dt ) : print ( dt ) print ( 'ctime  :' , dt . ctime ( ) ) print ( 'tuple  :' , dt . timetuple ( ) ) print ( 'ordinal:' , dt . toordinal ( ) ) print ( 'Year   :' , dt . year ) print ( 'Mon    :' , dt . month ) print ( 'Day    :' , dt . day )
how do you print the date as a date data type in python
prints a date - object
def print_datetime_object(dt):
    """prints a date-object"""
    print(dt)
    print('ctime  :', dt.ctime())
    print('tuple  :', dt.timetuple())
    print('ordinal:', dt.toordinal())
    print('Year   :', dt.year)
    print('Mon    :', dt.month)
    print('Day    :', dt.day)