UPDATE PLEASE READ:In order to be a shareholder of record on the RECORD DATE you must own the shares on that date (when the books close for that day). Since virtually all stock trades by brokers on exchanges are settled in 3 (business) days, you must buy the shares at least 3 days before the RECORD DATE in order to be the shareholder of record on the RECORD DATE. So the (RECORD DATE - 3 days) is the day that the shareholder of record needs to own the stock to collect the dividend. He can sell it the very next day and still get the dividend.
If you bought it at least 3 business days before the RECORD date and still owned it at the end of the RECORD DATE, you get the dividend. (Even if you ask your broker to sell it the day after the (RECORD DATE - 3 days), it will not have settled until after the RECORD DATE so you will own it on the RECORD DATE.)
So someone who buys the stock on the (RECORD DATE - 2 days) does not get the dividend. A stock paying a 50c quarterly dividend might well be expected to trade for 50c less on that date, all things being equal. In other words, it trades for its previous price, EXcept for the DIVidend. So the (RECORD DATE - 2 days) is often called the EX-DIV date. In the financial listings, that is indicated by an x.