On 5/8/07, Mark Hammond <[EMAIL PROTECTED]> 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)
thanks, the docs didn't explicitly cite the existance of those attributes... However I (mistakenly) thought of having tried to use them. It's evident that I hadn't tried correctly :-) Now the code is much more readable :-) Francesco
_______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32