thanks linz6018.
The ex dividend date occurs four business days before the company's Record Date. To be entitled to a dividend a shareholder must have purchased the shares before the ex dividend date. If you purchase shares on or after that date, the previous owner of the shares (and not you) is entitled to the dividend.