It works!

Thx

2010/11/17 akm <akm.m...@gmail.com>

> Try this:
>
> from sqlalchemy import func
> from sqlalchemy.sql import select
>
> s = select( [Plage.Id,
>            func.timediff(Plage.Start, Plage.Start)
>            ],
>           (func.timediff(Plage.Start, Plage.Start) >=
> func.time('02:20:00'))
>           )
>
>
> Thanks,
> --
> Abdul Kader M
>
> On Wed, Nov 17, 2010 at 4:36 PM, Christian Démolis
> <christiandemo...@gmail.com> wrote:
> > Hi,
> >
> > Do you know how to do this query with sqlalchemy?
> >
> > SELECT
> > Id,  TIMEDIFF( End, Start)
> > FROM
> > plage
> > WHERE
> > TIMEDIFF(End,Start)>=TIME('02:20:00');
> >
> > In my model, Start and End are DateTime
> > Start = Column('Start', DateTime)
> > End = Column('End', DateTime)
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "sqlalchemy" group.
> > To post to this group, send email to sqlalch...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > sqlalchemy+unsubscr...@googlegroups.com<sqlalchemy%2bunsubscr...@googlegroups.com>
> .
> > For more options, visit this group at
> > http://groups.google.com/group/sqlalchemy?hl=en.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "sqlalchemy" group.
> To post to this group, send email to sqlalch...@googlegroups.com.
> To unsubscribe from this group, send email to
> sqlalchemy+unsubscr...@googlegroups.com<sqlalchemy%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/sqlalchemy?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@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