Added the sorting algorithm for the date column.