Changing the hour range to a start date and end date