Re: [SQLObject] timestamp - date select

2008-08-06 Thread Oleg Broytmann
On Wed, Aug 06, 2008 at 07:10:12PM +0200, Petr Jake?? wrote: > I am on Firebird right now. AFIK Firebird does not support 'date'. > The syntax which works is: > > cast(test.ts as date) = '2008-08-01' > > But Python does not accept following construction: > > print list(Test.select(func.cast(Test

Re: [SQLObject] timestamp - date select

2008-08-06 Thread Petr Jakeš
> > from sqlobject import * > from sqlobject.sqlbuilder import * > > __connection__ = "sqlite:/:memory:?debug=1" > > from datetime import datetime > > class Test(SQLObject): > ts = DateTimeCol() > > Test.createTable() > > Test(ts=datetime.strptime('2008-08-01 21:44:33', '%Y-%m-%d %H:%M:%S')) > >

Re: [SQLObject] timestamp - date select

2008-08-06 Thread Oleg Broytmann
On Wed, Aug 06, 2008 at 01:05:02PM +0200, Petr Jake?? wrote: > in my tables I am using timestamp field. > I would like to select all records from the table that have the same date > (not the same timestamp!!), say all records with the date 31.12.2007. What > is the best way to do it in the SQLObjec