As mentioned, if you are not in the company's record books on the date of record, you won't receive the dividend payment. To ensure that you are in the record books, you need to buy the stock at least three days before the date of record, which also happens to be the day before the ex-dividend date.