When a company decides to pay out in what is called a dividend, it sets a date for the record of when you must be on the company's books as a shareholder to receive the dividend. This date is also used for the company to determine who is sent the company information such as financial reports, sent proxy statements, and other information.
Once the company sets the record date, the stock exchanges or the National Association of Securities Dealers, Inc. fix the ex-dividend date. The ex-dividend date is normally set for stocks two business days before the record date. If you purchase a stock on its ex-dividend date or after, you will not receive the next dividend payment. Instead, the seller gets the dividend. If you purchase before the ex-dividend date, you get the dividend.