It works! Thx
2010/11/17 akm <[email protected]> > 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 > <[email protected]> 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 [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<sqlalchemy%[email protected]> > . > > 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]<sqlalchemy%[email protected]> > . > 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
