What if I sell my shares on or after the ex dividend date?
On the 'ex date', the share will go ex dividend. This means that it is being offered for sale without the dividend. If you sell an ex dividend share, you will be entitled to the next dividend payment.
But again, the price of the share will reflect this - it will have dropped from its cum dividend price.