[web2py] Re: in a db query, why the error: can't compare datetime.datetime to Field

2011-08-18 Thread Luis Goncalves
Ah yes! Thank you, Greg! I come from the Matlab world and am not very experienced with object oriented program, but I was suspecting it was something like that. I think I found a true bug in the way datetime objects work in db queries, though -- I will post under a new subject heading. Thanks!

[web2py] Re: in a db query, why the error: can't compare datetime.datetime to Field

2011-08-18 Thread Gregory Hellings
If I understand what you're doing there it is a limitation of the language. db.entry.DT > my_DT works because Field has defined a special language construct for when the datetime is compared to the Field. However, my_DT < db.entry.DT does not work, because there you are comparing a Field to a date