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

print list(Test.select(func.date(Test.q.ts) == '2008-08-01'))

 2/QueryIns:  INSERT INTO test (ts) VALUES ('2008-08-01 21:44:33')
 2/QueryR  :  INSERT INTO test (ts) VALUES ('2008-08-01 21:44:33')
 3/QueryOne:  SELECT ts FROM test WHERE ((test.id) = (1))
 3/QueryR  :  SELECT ts FROM test WHERE ((test.id) = (1))
 4/Select  :  SELECT test.id, test.ts FROM test WHERE ((date(test.ts)) = ('2008-08-01'))
 4/QueryR  :  SELECT test.id, test.ts FROM test WHERE ((date(test.ts)) = ('2008-08-01'))
[<Test 1 ts='datetime.datetime...)'>]

  'func' is SQLBuilder's magic that passes its attribute to SQL unchanged.
Note 'date(test.ts)'! You should check that your backend actually
implements the function (for 'date' most do).

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.q.ts as date) == '2008-08-01'))