Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Hi, i wanna compare two dates with this line but an error occurs :
This is the print of my two dates (they have the same format) :
if idProd.last_synchro_ingram < date:
date = 2016-03-02
idProd.last_synchro_ingram = 2016-03-09
I tested with it and it didn't work :
DEFAULT_SERVER_DATE_FORMAT = "%Y-%m-%d"
if datetime.strptime(idProd.last_synchro_ing, DEFAULT_SERVER_DATE_FORMAT) < datetime.strptime(date, DEFAULT_SERVER_DATE_FORMAT):
print "idProd.last_synchro_ing < date"
if datetime.strptime(idProd.last_synchro_ing, DEFAULT_SERVER_DATE_FORMAT) > datetime.strptime(date, DEFAULT_SERVER_DATE_FORMAT):
print "idProd.last_synchro_ing > date"
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 3/9/16, 10:47 AM|
|Seen: 1212 times|
|Last updated: 3/11/16, 4:08 AM|