In Java, I have a data in my array like the following
2009.07.25 20:24 Message A
2009.07.25 20:17 Message G
2009.07.25 20:25 Message B
2009.07.25 20:30 Message D
2009.07.25 20:01 Message F
2009.07.25 21:08 Message E
2009.07.25 19:54 Message R
I would like to sort it based on the first column, so my final data can look like this
2009.07.25 19:54 Message R
2009.07.25 20:01 Message F
2009.07.25 20:17 Message G
2009.07.25 20:24 Message A
2009.07.25 20:25 Message B
2009.07.25 20:30 Message D
2009.07.25 21:08 Message E
The first column is a date of format "yyyy.MM.dd HH:mm" and the second column is a String.
Since you say 2-D array, I assume "date of format ..." means a String. Here's code for sorting a 2-D array of String[][]:
Output: