title: Sorting dates with time
body: <p>I am trying to sort dates with the times inside of my array strings. The dates sort just fine but I need to sort the times with the respective date. SORT TIMES NOT DATES. My column class is set up date. My date123 array prints out: </p>
  
  <p>Here is the problem: </p>
  
  <pre><code>        Variables:
           Date[] date123 = new Date[8];
           String rowdata[] = new String[8];
  
  
          String array1[] = { dateString1(current time), "10:18:17 PM"};
          String array2[] = {"1999/01/19 08:09:10 AM", "10:00:33 AM"};
          String array3[] = {"1989/12/05 09:00:56 PM", "07:12:19 AM"};
          String array4[] = { dateString1, "10:18:17 PM"};
          String array5[] = {"2001/06/10 08:09:10 AM", "10:40:53 AM"};
          String array6[] = {"2000/01/12 05:00:56 PM", "07:12:19 AM"};
          String array7[] = { dateString1, "10:18:17 PM"};
          String array8[] = {"2010/01/09 10:09:10 AM", "3:00:33 PM"};
  
  
          rowdata[0] = array1[0];
          rowdata[1] = array2[0];
          rowdata[2] = array3[0];
          rowdata[3] = array4[0];
          rowdata[4] = array5[0];
          rowdata[5] = array6[0];
          rowdata[6] = array7[0];
          rowdata[7] = array8[0];
  
          for(int t = 0; t&lt;rowdata.length; t++)
          {
              DateFormat sdf = new SimpleDateFormat("yyyy/MM/dd hh:mm:ss a");
  
              try {
                  date123[t] = sdf.parse(rowdata[t]);
              } catch (ParseException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              }
          }
  
       @Override
       public Class&lt;?&gt; getColumnClass(int column) {
                  switch (column) {
                  case 0:
                      return Boolean.class;
                  case 1:
                      return String.class;
                  case 2:
                      return String.class;
                  case 3:
                      return Date.class;
                  default:
                      return Date.class;
                  }
              }
  
              data11.add(date123[t]);
  </code></pre>
  
  <hr>
  
  <p>Output:</p>
  
  <blockquote>
    <p>Aug 21,2014</p>
    
    <p>Jan 19, 1999</p>
    
    <p>Dec 05, 1989</p>
    
    <p>Aug 21, 2014</p>
    
    <p>Jun 10,2001</p>
    
    <p>Jan 12,2000</p>
    
    <p>Aug 21,014</p>
    
    <p>Jan 09,2010</p>
  </blockquote>
  
  <p>But this is what is being put in table: just the date and not times. The dates are sorted, but I need the times to be printed with the dates, but I want the times to be sorted not DATES... Please help .</p>