def long_to_datetime(x):
 days = (x // 86400000000)
 x -= (days * 86400000000)
 seconds = (x // 1000000)
 x -= (seconds * 1000000)
 return (datetime.min + timedelta(days=days, seconds=seconds, microseconds=x))

def long_to_datetime ( x ) : days = ( x // 86400000000 ) x -= ( days * 86400000000 ) seconds = ( x // 1000000 ) x -= ( seconds * 1000000 ) return ( datetime . min + timedelta ( days = days , seconds = seconds , microseconds = x ) )
converts a long integer representing the number of microseconds since datetime .