On Jun 19, 2006, at 6:42 AM, Simen Haugen wrote:

I see that dabo automatically get mysql time fields as timedelta
objects, but timedelta objects does not have a replace function, so this
fails when trying to save.
I would like to store it as a time object for it to work, but I can't
find out how to change the columntype from timedelta to time.

Is this done in the biz object somehow or on the grid?

OK, I've been playing around with this a bit, and it seems to be a problem in the mx.DateTime module. I'm assuming that you have that installed, since if it is, MySQLdb will use it.

>>> import mx.DateTime
>>> tm = mx.DateTime.Time
>>> td = mx.DateTime.TimeDelta
>>> tm
<function TimeDelta at 0x622b0>
>>> td
<function TimeDelta at 0x622b0>
>>> tm == td
True

In other words, mx.DateTime.Time seems to be an alias for mx.DateTime.TimeDelta; there is no Time type in mx.DateTime.


-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Reply via email to