d1=datetime.date(year_full,month,1) d2=datetime.date(year_full,month,31) count = db(db.posts.published_on>=d1) (db.posts.published_on<=d2).count()
On Aug 11, 1:40 pm, "Martin.Mulone" <[email protected]> wrote: > I need to transform this query that works in RDBS to GAE. Both of them > are working i check it, but there are a better way, more simpler?. > > RDBS: > count = db((db.posts.published_on.year()==year_full) & > (db.posts.published_on.month()==month)).count() > > GAE: > count = len(db(db.posts.id>0).select().find(lambda > row:row.published_on.year==year_full).find(lambda > row:row.published_on.month==month))

