Vergleiche doch im Gleichheitsfall nachträglich noch den Text.
Delphi-Quellcode:
function DoCompareByDate(List: TStringList; Index1, Index2: Integer): Integer;
begin
Result := 0;
if Assigned(List) then
begin
if (Integer(List.Objects[Index1]) < Integer(List.Objects[Index2])) then
Result := 1
else
if (Integer(List.Objects[Index1]) > Integer(List.Objects[Index2])) then
Result := -1
else
if (List[Index1] < List[Index2]) then
Result := 1
else
if (List[Index1] > List[Index2]) then
Result := -1;
end;
end;