Ex-Dividend Date
On or after this date, a security trades ex-dividend, or without a previously declared dividend or distribution. If you sell a stock on or after this day but before the dividend is paid, you (and not the buyer) are entitled to the dividend. (this information according to td ameritrade's glossary)
In other words, the final date dividends will be paid to the owner of the stock. If a stock is sold after that date, all succeeding owners will not receive dividends.
More thorough example on this site: http://www.sec.gov/answers/dividen.htm