Once the company sets the record date, the ex-dividend date is set based on stock exchange rules. With T+1 settlement, the ex-dividend date and the record date are the same, except in the case of settlement holidays. If you purchase a stock on or after its ex-dividend date, you will not receive the next dividend payment.