When you invest in dividends, understanding the ex-dividend date is important as you make decisions about when to buy and sell dividend stocks.