About sorting two arrays

 
Note:I'm using the translation function. There may be wrong expressions. In that case, I'm sorry.
string name[] // get name of horizontal line
datetime time[] // get the time of the horizontal line 
I want to sort the time in descending order.
At that time, I want to rearrange the array of names as well.

What should I do?
Please answer.
 
    string name[]; // get name of horizontal line
    datetime time[][2]]; // get the time of the horizontal line 
for(…){ name[i]=…; time[i][0]=…; time[i][1]=i; }
ArraySort(time);
PrintFormat("2nd element time=%s name=%s", TimeToString(time[2][0]), name[ time[2][1] ]);

 
William Roeder #:
  string name[]; // get name of horizontal line     datetime time[][2]]; // get the time of the horizontal line for(…){ name[i]=…; time[i][0]=…; time[i][1]=i; } ArraySort(time); PrintFormat("2nd element time=%s name=%s", TimeToString(time[2][0]), name[ time[2][1] ]);

Thank you for reply.

It was helpful!