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:
if not start or date < start: start = date
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is a
datetime.date()method for converting from a datetime to a date.To do the opposite conversion, you could use this function
datetime.datetime(d.year, d.month, d.day)