John,
> c.execute('SELECT * FROM times where rt_weekst >= date(2006,01,31)
> and
> rt_weekst <= date(2006,12,31) and rt_type == ?', ("R",))
> a = datetime.date(2006,01,31)
> b = datetime.date(2006,12,31)
> c.execute('SELECT * FROM times where rt_weekst >= ? and rt_weekst <=
> ?
> and rt_type == ?', (a,b,"R",))
In the first case the dates are strings passed to the SQL date
function.
In the second they are Python datetime objects. I suspect you need to
convert the datetime objects to strings before passing them as
arguments
to execute()
Alan G
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor