Sparity Interview Question

Sort and print the time and date. Can Some basic calculation.