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
>
> 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'))
>
>
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