Sorting out the output of the data and removing the times if allday is checked