The LB sort command is good for almost all cases, but in this case, I needed to sort some print lines on a field in the middle of the line, so I used the bubble sort.
It compares pairs of lines and flips them if the second one is lower than the first one.
FOR i=1 TO chosenCtr 'sort to time sequence
FOR j=1 TO (chosenCtr-1)
IF mid$(classChosen$(j),17,4) > mid$(classChosen$(j+1),17,4) THEN
temp$ = classChosen$(j)