Sorting data

sorting data by date and put it in a list