def dt_to_filetime(dt, delta_from_utc):
 dt += delta_from_utc
 ft = (EPOCH_AS_FILETIME + (timegm(dt.timetuple()) * HUNDREDS_OF_NANOSECONDS))
 return (ft + (dt.microsecond * 10))

def dt_to_filetime ( dt , delta_from_utc ) : dt += delta_from_utc ft = ( EPOCH_AS_FILETIME + ( timegm ( dt . timetuple ( ) ) * HUNDREDS_OF_NANOSECONDS ) ) return ( ft + ( dt . microsecond * 10 ) )
converts a datetime to microsoft filetime format .