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.

http://en.wikipedia.org/wiki/sorting_algorithm


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -