To simplify the explanation a bit, you get the dividend if you buy a stock before the ex-dividend date and don't sell it until (or after) the ex-dividend date.
But specifically with regards to BP, the last ex-dividend date for the ADRs sold on the NYSE was November 10. The next ex-dividend...