Yup, what fiveoh said. I look up dividends on Bloomberg at work, but each company will generally have investor relations news on their site.
There are 3 different dates that are relevant to dividends:
1. Announcement/declaration date - when the company lets the public know that they'll be issuing a dividend
2. The ex-date - the date that determines who gets the dividend. all shareholders on ex-date receive the dividend. If you sell your shares after ex-date, you're still entitled to the dividend. If you sell the day before ex-date, you don't get the dividend. If your friend bought shares after ex-date, he doesn't receive the div, but the share price should be adjusted to account for it (should decrease by the amount of the dividend).
3. The payout date - the date when cash actually moves from the company to investors.