There is no specific time-frame, but the shares will be quoted either 'cum' dividend or 'ex' dividend, that is with dividend or without dividend. Normally when a share is marked 'ex' dividend, the share price will reflect that by trading at a lower price approximately equal to the dividend that is due to be paid. If you sell the shares while they are still quoted 'cum' dividend, but after the record closing date, you will have to pass the dividend received to your broker in order that it cn be paid to the purchaser.