I\'m trying to perform the following query in Sqlalchemy.
Select * from \"Mytable\" where Date(date_time_field) = \"2011-08-16\";
I have tried
Using @Ants Aasma Comment.
And to Keep it clean for any web search.
from sqlalchemy import Date, cast from datetime import date my_data = session.query(MyObject).\ filter(cast(MyObject.date_time,Date) == date.today()).all()
Thank you all who tried to solve this problem :)