Hi all,

I have a table with a column called created_at which is a datetime
field. I'm trying to construct a query where I would like the results
ordered by just the date portion of the datetime field, but I can't
find any reference to the correct syntax for such a query.

This works:

query = model.MyClass.q.order_by(model.MyClass.created_at).all()

...but it's not what I'm after. I need to order by only the date & not
by the date and time.

Does anybody have any tips on how to do this?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to