When a share is sold just after the date you become entitled to a dividend, but before the date the dividend is paid out, the share is sold ex-dividend. You are still entitled to receive the dividend.