SPY went ex-dividend Friday, December 16th, 2011, with a dividend of $0.7701 per share. The table below summarizes fourth quarter dividend information for SPY, IVV, and VOO—the three biggest S&P 500 index ETFs.
You only have to buy a stock or ETF the day prior to its ex-dividend date to be eligible for the dividend. You can sell on the ex-dividend date if you want and still collect the dividend when the distribution / pay date arrives. Be aware that in a flat market the stock or ETF at opening on its ex-dividend date will typically drop in value by the dividend amount. See Top 10 questions if you have more questions on dividends.
For more information about ex-dividend and distribution dates for SPDR, iShares, Schwab, and Vanguard ETFs see this post.
See the chart below for SPY’s dividend history since 2004.