I am required to extract the time of the day from the datetime.datetime object returned by the created_at attribute. But I do not understand how to do that. This is my code
datetime has fields hour and minute. So to get the hours and minutes, you would use t1.hour and t1.minute.
However, when you subtract two datetimes, the result is a timedelta, which only has the days and seconds fields. So you'll need to divide and multiply as necessary to get the numbers you need.