asp classic - Sorting two dimensional array by date -
i have 2 dimensional array. 1 dimension date, other dimension name.
and trying sort these array values latest date.
i looked @ couple of examples , came this.
but dates not sorted properly.
datamax = ubound(sdatearray)-1 = 0 datamax j = + 1 datamax if datediff("s", dataarray(j, 0), dataarray(i, 0)) > 0 temporalvariable = sdatearray(i, 0) sdatearray(i, 0) = sdatearray(j, 0) sdatearray(j, 0) = temporalvariable end if next next i=0 datamax response.write (sdatearray(i) & "<br>") next
that loop not correct sorting algorithm.
Comments
Post a Comment