in reply to Re^2: Sorting a CSV file
in thread Sorting a CSV file

"..it gives error otheriwse it is sorting by date"

No. As I already pointed out, it is not sorting by date at all. It only appears to be be working because your sample data happens to be ordered by date. Try re-arranging the lines in your sample data and you will see what I mean.