Add DateTime to cast() logic