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:
<
Assuming start is a datetime, Use it like this:
if not start or date < start.date(): start = date
I don't think there is a need to convert date to datetime in python, as you can just do the opposite and compare.
Or else you have other methods to create a new datetime by using the date to convert and time at 00:00.