In my table I have a datetime field. In one condition I have to check only 
date in that field, so I have tried as below

db(db.table_name.timestamp.date()==datetime.today.date())

but it is throwing error as 'AttributeError: 'Field' object has no 
attribute 'date''.

I have tried both 'date()' and 'date' didnt work. 
I have also noticed that the datetime field has some other attributes (day, 
month, year). I can check for attributes day, month, year with the current 
date. But I would like to know if there is any direct way.
I would greatly appreciate any suggestions.

-- 

--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to