Question: how long do you have to hold a stock after the ex-dividend date?
Answer: The record date is set one business day after the ex-dividend date. So, to be officially recorded as a shareholder entitled to the next quarter's dividend, you must buy a stock two business days before the record date.