> that "dirty hack" fails for the MSSQL adapter in 1.97.1:

Well yes, I called it a dirty hack!

I'm looking for a function to extract date and time from a datetime db
side and I think I found one for every database supported by the DAL,
I'm in the process of review my research.

I'm intrugued in the process to add new date() and time() functions to
Filed class.

>>>> rr=db(db.test).select(db.test.data)
>>>> print rr[0]
> <Row {'data': datetime.datetime(2011, 7, 15, 14, 34, 18)}>
>
>>>> rr=db(db.test).select(db.test.data[:10])
>>>> print rr[0]
> <Row {'_extra': <Row {'SUBSTR(test.data,1,(11 - 1))': u'2011-07-15'}>}

Yes, I noticed that, a substring command returns a string, and not a
date object ... But for me it will suffice.

Thank you!

Reply via email to