[python-win32] PyTime
Francesco Guerrieri
f.guerrieri at gmail.com
Tue May 8 12:29:47 CEST 2007
hello,
I have another newbie question. I have googled around but didn't find an
answer.
I have an Excel file with many dates beyond 2038, which arrive to me as a
list of PyTime objects. From the doc I have found (
http://aspn.activestate.com/ASPN/docs/ActivePython/2.4/pywin32/PyTime.html )
it appears that an int conversion is needed to handle them. There is even a
reference to an __int__ method which I cannot use
>>> import pywintypes
>>> testTime = pywintypes.Time
>>> testTime.__int__
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
AttributeError: 'builtin_function_or_method' object has no attribute
'__int__'
>>>
In any case, int is not enough to go beyond 2038. Since I only need the day,
month and year, and surely not the seconds :-) I would be more than happy to
use some date object. I still haven't found how to initialize them with my
pytime objects... can you tell me where to look for?
thanks in advance,
Francesco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20070508/b79111f8/attachment.html
More information about the Python-win32
mailing list