TAdvStringGrid and quicsort by date column

Should quicksort work by date column, cause I have strange results of it

  AdvStringGrid1.SortIndexes.AddIndex(2,true);
  AdvStringGrid1.QuickSortIndexed(1,AdvStringGrid1.RowCount-1);

result looks like this
image

Is this matching the system short date format (i.e. set with formatsettings.ShortDateFormat)?

Ah. FormatSettings.ShortDateFormat is dd/MM/yyyy dateseparator is .
This is interesting, where does Delphi get that? All regional settings have dd.mm.yyyy
I initalized data grid.dates[c,r] := .... so assumed that I don't need to
worry about format se
But changing formatsettings helped.

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.