Il 11/02/2011 18:53, Massimo Di Pierro ha scritto:
db(db.mytab.date1-db.mytab.date1 ==
datetime.timedelta(days=2).select()
must be
db(db.mytab.date1 == db.mytab.date1 +
datetime.timedelta(days=2).select()
a query has the form field = expression. You cannot have the
expression on the left-hand side.
I cannot exclude something else is also wrong. Please check and let us
know.
ok, but in this case I have to transform the datetime value to a date
value otherwise my query returns no records but I don't know how to do
it because I have to use an external function and not a class method
because the object I consider is a Field not a datetime, further more if
I use datetime.combine() it says "TypeError: combine() argument 1 must
be datetime.date, not Field"
any suggestion?
thank you very much
Manuele