Hello,

I'm using Kinterbasdb to access a Firebird database through Python, and when I retrieve a row with a datetime value, I get a tuple like:

>>> myCursor.execute( 'SELECT * FROM table' )
>>> for row in myCursor.fetchall():
print row
(<DateTime object for '2004-08-09 00:00:00.00' at d41720>, 'value2', 'value3', 'value4', 100)


I would like to get:

('8/9/2004', 'value2', 'value3', 'value4', 100)

The formatting of the date isn't so important, though.

Does anyone know how to convert the DateTime object into an actual datetime, and vice versa? I'm pretty sure what I want to do is documented here ( http://kinterbasdb.sourceforge.net/dist_docs/usage.html#adv_param_conv_dynamic_type_translation ), but I don't understand what is going on.

Thanks for any help,

Bill
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to