Possible Duplicate:
How to compare datetime in Django?
I need to compare 2 dates
object.submit_date.ctime() > user.last_login.ctime()
but always get false.
no matter whether last_login it is after the last submit_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.
are comparing wrong, you have to use date() or isoformat() instead of ctime()
Like this:
this includes the time
or