CAST effective date to datetime