def ole2datetime(oledt):
 val = float(oledt)
 if (val < 61):
  raise ValueError(('Value is outside of acceptable range: %s ' % val))
 return (OLE_TIME_ZERO + timedelta(days=val))

def ole2datetime ( oledt ) : val = float ( oledt ) if ( val < 61 ) : raise ValueError ( ( 'Value is outside of acceptable range: %s ' % val ) ) return ( OLE_TIME_ZERO + timedelta ( days = val ) )
function for converting excel date to normal date format .