Casting of date should be interger