q &= db.auth_event.time_stamp >= '4/1/13'

should be

q &= db.auth_event.time_stamp >= '2013-01-04 00:00:00'

'4/1/13' is a string, not a date or datetime object nor something the 
database can make sense of.

On Friday, 26 April 2013 06:02:31 UTC-5, Anthony wrote:
>
> On Friday, April 26, 2013 12:57:39 AM UTC-4, Massimo Di Pierro wrote:
>
>> I do not think the problem is &== but the data you are comparing (a date 
>> with a string).
>
>
> I don't think that's the problem:
>
> >>> q = db.auth_event.id > 0
> >>> q &= db.auth_event.time_stamp >= '4/1/13'
> >>> q &= db.auth_event.time_stamp <= '4/5/13'
> >>> db(q)._select()
> "SELECT  auth_event.id, auth_event.time_stamp, auth_event.client_ip, 
> auth_event.user_id, auth_event.origin, auth_event.description FROM 
> auth_event WHERE (((auth_event.id > 0) AND (auth_event.time_stamp >= 
> '4/1/13')) AND (auth_event.time_stamp <= '4/5/13'));"
>
> Anthony
>
>

-- 

--- 
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/groups/opt_out.


Reply via email to