pydal has year, month, day, hour minutes. Anyway, for relational databases, 
doing a compare like that is asking them to calculate the date part for 
each "created_on" cell (everything on the "left side" shouldn't be a result 
of a function, that's database tuning 101)
This because the database would need a complete full scan on the table (any 
index would be disregarded). 
It's so much better (and rather easy) that you ask for an "in between" of 
fixed values wherever you can. And the query would be a zillion time 
faster. 

On Saturday, November 28, 2015 at 7:52:43 PM UTC+1, pbreit wrote:
>
> Is it correct that if I want to search the db for items created_on a 
> specific day (i.e., "2015-11-28") i need to compare before/after 
> today/yesterday?
>
> There's nothing like db(db.item.created_on.date()== "2015-11-28").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.

Reply via email to