Awesome. Exactly what I needed, thank you.

On May 29, 4:14 pm, Massimo Di Pierro <massimo.dipie...@gmail.com>
wrote:
> set = db(db.posts.id).select(db.posts.posted_date, count,
> groupby=db.posts.posted_date.year()|db.posts.posted_date.month()|
> db.posts.posted_date.day())
>
> On May 29, 2:42 pm, Neodudeman <tams...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi web2py; I've got some problems.
> > I'm attempting to get a count of some rows based on thedate; but when
> > I attempt the grouping, it includes thetimeas well, giving me a
> > false count. (Since no two rows were created at the exact same second,
> > the count never goes above 1 per 'date')
>
> > Here's my current code:
>
> > count = db.posts.id.count()
> > set = db(db.posts.id).select(db.posts.posted_date, count,
> > groupby=db.posts.posted_date)
>
> > How can I change the groupby toignorethetimeportion of the
> > posted_date?

Reply via email to