To successfully qualify for a dividend payment, you generally need to purchase and hold the stock before its ex-dividend date. Specifically, you must buy the stock at least one business day prior to the ex-dividend date and hold it through the end of that trading day. Once you own the shares on the ex-dividend date, you remain entitled to the dividend payout even if you sell the stock on or after that date.