Can you sell a stock after the ex dividend date and still get the dividend

HomePybus32847Can you sell a stock after the ex dividend date and still get the dividend