Converting a FILTIME in a datetime is sometime verry useful if you use ctypes with win API.
1 2 3 4 5 6 7 8 | import datetime
_FILETIME_null_date = datetime.datetime(1601, 1, 1, 0, 0, 0)
def FiletimeToDateTime(ft):
timestamp = ft.dwHighDateTime
timestamp <<= 32
timestamp |= ft.dwLowDateTime
return _FILETIME_null_date + datetime.timedelta(microseconds=timestamp/10)
|
Tags: sysadmin
type problem. This looks interesting, but I'm missing something::
TypeError: int expected instead of float instance
What am I doing wrong?
Thanks, Kent