casting start and end to datetime