As stated previously, one may Sellon or after the Ex-Div date and still receive the dividend, but one must Buy the stock before the Ex-Div date. Note, however, that the price of the stock will usually adjust downwards on the Ex-Div date by the amount of the dividend, so there is no gain to be had by buying before Ex-Div and selling immediately on Ex-Div unless the stock price is rising sufficiently.