Skip to content

Instantly share code, notes, and snippets.

@lxneng
Created March 27, 2012 05:38
Show Gist options
  • Save lxneng/2212853 to your computer and use it in GitHub Desktop.
Save lxneng/2212853 to your computer and use it in GitHub Desktop.
from sqlalchemy import Date, cast
from datetime import date
my_data = session.query(MyObject).\
filter(cast(MyObject.date_time,Date) == date.today()).all()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment