You will be eligible to receive the dividend for stocks you bought before the ex-date. Note that you won't get dividend if you buy the stock on the ex-date, but you will be eligible if you sell them on the ex-date. Dividend will be credited to your primary bank account if you sell the stocks on the ex-date.