Skip to content

Instantly share code, notes, and snippets.

@danielthiel
Last active February 12, 2021 13:06
Show Gist options
  • Save danielthiel/8374607 to your computer and use it in GitHub Desktop.
Save danielthiel/8374607 to your computer and use it in GitHub Desktop.

Revisions

  1. danielthiel renamed this gist Mar 1, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. danielthiel revised this gist Jan 11, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion SQLAlchemy: cast
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    from datetime import date
    from sqlalchemy import cast, DATE
    Match.query.filter(cast(Match.date_time_field, DATE)==datetime.utcnow().date()).all()
    Match.query.filter(cast(Match.date_time_field, DATE)==date.today()).all()
  3. danielthiel created this gist Jan 11, 2014.
    3 changes: 3 additions & 0 deletions SQLAlchemy: cast
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    from datetime import date
    from sqlalchemy import cast, DATE
    Match.query.filter(cast(Match.date_time_field, DATE)==datetime.utcnow().date()).all()