I have a requirement to sort a set of records that come in an array. The sorting criteria for that array is all most current records (by date) should come first followed by older ones.
If there are multiple records on same day, then older record should come first followed by newer records...
Example:
If I have records like this..
$dateArray[0] =20010405000000; $dateArray[1] =20050405005000; $dateArray[2] =20020405081200; $dateArray[3] =20080405022500; $dateArray[4] =20080405022600; $dateArray[5] =20080405023500; $dateArray[6] =20090405022500; $dateArray[7] =20090405022300; $dateArray[8] =20090405022900; $dateArray[9] =20090405022100;
20090405022100 20090405022300 20090405022500 20090405022900 20080405022500 20080405022600 20080405023500 20050405005000 20020405081200 20010405000000
In reply to Date to be sorted in descending and time in ascending by karthik7887
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |