COM and returning dates

Mark Hammond mhammond at
Wed Apr 19 22:18:35 EDT 2000

Look up the documentation for pythoncom.MakeTime() - this will create a
time object from a time represented by the standard Python "time" module.
Create and pass one of these objects to COM as a date/time value.

mxDateTime objects can also be converted to COM date/times, so this is
another alternative.


"Richard Chamberlain" <richard_chamberlain at> wrote in message
news:8dkj9b$lvr$1 at
> Hi,
> I'm trying to use Python as a COM object (called from VB) basically
> returning values from a database, some of which are dates.
> The problem I'm getting is that the dbi date object obviously doesn't
> translate.
> So is there a way a can simply do this?
> I was thinking of running through the list and converting the dbi date
> objects into string representations and passing those. But I'm not sure
> I do with them on the VB side.
> Any better ideas?
> Thanks
> Richard

More information about the Python-list mailing list