If i sell my shares after dividend declaration date, will i still get the dividend or i should hold shares till dividend is distributed?

If i sell my shares after dividend declaration date, will i still get the dividend or i should hold shares till dividend is distributed?

there is always an EX DATE and if you sell on shares at this date or after this date you will get dividend.this EX date is always announced by bse/nse.

You must hold it till ex date to be eligible for dividend.If you are eligible for dividends, you will receive the dividends in your bank account (primary bank linked with Zerodha DEMAT), on the dividend payment date. If you have sold shares from your holdings on the ex-date, the dividend will be credited to your trading account.

The dividend payment date is generally 30-45 days after the record date.