Split datetime into start and end dates