Changing date to int