[python-win32] Translating vbs GetObject("LDAP://...") to Pyt hon?

R. Alan Monroe amonroe at columbus.rr.com
Tue Nov 9 23:08:16 CET 2004


> I'm looking at the
> "PasswordLastChanged" property,

Looking at the .tlb I can see that PasswordLastChanged returns:
[id(0x0000003b), propget]
HRESULT PasswordLastChanged([out, retval] DATE* retval);

If I do type() on the variable I assign it to, it says 'time', and it
prints a sensible looking date like 10/25/04 11:18:59 to the screen.
But I can't figure out how to compare that to, say, time.time(). How
do I find out the number of elapsed days between the date it returns
and the current date?

I naively tried just subtracting one from the other, but all that gets
me is TypeError: unsupported operand type(s) for -: 'float' and 'time'

Alan



More information about the Python-win32 mailing list