getting the best dates for sort date