I now it was posted a long time ago, but there are a simpler solution:
dt = request.now.date()
rows = db(
(db.events.created_on.date()==dt)
).select()
Em terça-feira, 28 de junho de 2011 17:10:08 UTC-3, Vasile Ermicioi
escreveu:
>
> a bit longer but selects by exact date
>
> dt = request.now
>
> rows = db(
> (db.events.created_on.year()==dt.year) &
> (db.events.created_on.month()==dt.month) &
> (db.events.created_on.day()==dt.day)
> ).select()
>
>
>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.