Mark Hammond wrote:
> Your solution seems to be to simply construct a datetime 
> object from the
> pywintypes time object by way of attributes - eg:
> 
> >>> from win32com.client import Dispatch
> >>> import datetime
> >>> xl=Dispatch("Excel.Application")
> >>> d=xl.Range("A1").Value
> >>> datetime.datetime(d.year, d.month, d.day, d.hour, 
> d.minute, d.second,
> d.msec)
> datetime.datetime(2065, 2, 3, 0, 0)

Argle bargle...#$%^&*

Wish I'd known about those attributes before I spent far too many hours
trying to extract them back from float(d) [1]. Yet another lesson in the
dangers of multiple documentation locations. Ah well, at least I learned
something about Jet and SQL server internals.


Robert Brewer
System Architect
Amor Ministries
[EMAIL PROTECTED]

[1] http://projects.amor.org/geniusql/changeset/84
_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to