I have the following code and am getting the above error. Since I\'m new to python I\'m having trouble understanding the syntax here and how I can fix the error:
<
You can use the datetime.datetime.combine
method to compare the date object to datetime object, then compare the converted object with the other datetime object.
import datetime
dt1 = datetime.datetime(2011, 03, 03, 11, 12)
day = datetime.date(2011, 03, 02)
dt2 = datetime.datetime.combine(day, datetime.time(0, 0))
print dt1 > dt2