I have a two dimensional array. One dimension is date, other dimension is name.
And I am trying to sort these array values by the latest date.
I looked at couple of examples and I came up with this.
But dates are not sorted properly.
DataMax = uBound(sDateArray)-1
For i = 0 to DataMax
For j = i + 1 to DataMax
If DateDiff("s", DataArray(j, 0), DataArray(i, 0)) > 0 Then
TemporalVariable = sDateArray(i, 0)
sDateArray(i, 0) = sDateArray(j, 0)
sDateArray(j, 0) = TemporalVariable
End If
Next
Next
For i=0 to DataMax
Response.write (sDateArray(i) & "<BR>")
next