How do i implement a java comparator class which can sort the order of the list of date/time strings?
Like e.g.
i have
2012-06-15T12:01:00.000+08:00
2012-06-25T12:15:00.000+08:00
2012-06-08T00:00:00.000Z
Then it should be sorted like
2012-06-08T00:00:00.000Z
2012-06-15T12:01:00.000+08:00
2012-06-25T12:15:00.000+08:00
You have two issues here (since parsing the strings directly is not going to work).