If you have bought the shares before ex-dividend date, you will be eligible for the dividend. If you have bought the shares on or after ex-dividend date, you are not eligible for the dividend.
If you hold the shares on the record date, you are eligible for the dividend. Within a week or fortnight from the record date, dividend will be credited to your bank account which is linked to your demat account.
ex-dividend date and record date will be available in BSE and NSE site and also in all the financial sites.