COM dates

Mark Hammond MHammond at
Thu Jun 10 18:00:33 EDT 1999

M.-A. Lemburg wrote in message <375F77C1.629FED7B at>...

>Not sure how you would convert the Win32 PyTime objects into
>DateTime objects though. If they implement the int() APIs, then
>DateTimeFromTicks(pyTime) will do, otherwise there's also a
>constructor DateTimeFromCOMDate(comdate) which takes the raw
>COM date float as argument.

"Win32 PyTime" dates and "COM dates" are the same thing.  Although COM uses
them most heavily, we decided to move the date support into the Win32
extensions, so everyone can use them.  (Specifically, they are implemented
in pywintypes15.dll, along with our Unicode objects, HANDLE objects, UUID
objects, etc)

FWIW, I personally use mxDateTime whenever I hit the many limitations in
Python dates.  As Marc said, I used DateTimeFromCOMDate, then work with the
DateTime object.  Can''t recall exactly how I convert it back, but it is
definately there.


More information about the Python-list mailing list