--On 18. Januar 2008 12:08:46 -0500 Rick Morrison <[EMAIL PROTECTED]> wrote:

There are no generic date functions in SQLAlchemy (although work has begun
on them). So for now, you'll need to use date functions native to your
database.

For sqlite something like,

    func.strftime('%Y', Mikropost.c.create_date) == '2008'

should work -- you may need to add additional percent signs depending on
how badly the '%Y' literal is mangled during parameter collection.



Such operations will likely trigger a full table scan. Depending on the size of your data you might adjust the data model to the need of your query and/or think about functional indexes (in case your database provides this functionality).

Andreas

Attachment: pgpQvohGvKt7k.pgp
Description: PGP signature

Reply via email to