logical comparasion with datetime type DAL field

7 views
Skip to first unread message

seongjoo

unread,
Oct 1, 2011, 3:36:03 AM10/1/11
to web2py-users
When a field in a table of models has a datetime as below,

db.define_table('tablename', ..., Field('time', 'datetime') )

I want to use the time value to query latest update of entries. So I
figured that below might achieve the purpose:

db.((db.tablename.account== id) & (db.tablename.time >
lastupdate)).select()

, where lastupdate is datetime object.

The problem is that the query selects as if the latter condition is
not there.
Reply all
Reply to author
Forward
0 new messages