title: p:dataTable sorting Time
body: <p>I have a PrimeFaces DataTable like so:</p>
  
  <pre><code>&lt;p:dataTable
          id="datatable_current_month_timesheets"
          value="#{timesheetBean.currentMonthTimesheets}" var="item"&gt;
      &lt;p:column headerText="starttimeDate" sortBy="#{item.starttime}"&gt;
          &lt;h:outputText value="#{item.starttime}"&gt;
              &lt;f:convertDateTime pattern="EEE, dd.MM.yyyy" /&gt;
          &lt;/h:outputText&gt;
      &lt;/p:column&gt;
      &lt;p:column headerText="starttimeTime" sortBy="#{item.starttime}"&gt; //how to sort this?
          &lt;h:outputText
              value="#{item.starttime}"&gt;
              &lt;f:convertDateTime pattern="HH:mm" /&gt;
          &lt;/h:outputText&gt;
      &lt;/p:column&gt;
      &lt;p:column headerText="timeGap" sortBy="#{item.starttime}"&gt; //how to sort this?
          &lt;h:outputText
              value="#{timesheetBean.calculateTimeGap(item)}"&gt;
              &lt;f:convertDateTime pattern="HH:mm" /&gt;
          &lt;/h:outputText&gt;
      &lt;/p:column&gt;
  &lt;/p:dataTable&gt;
  </code></pre>
  
  <p>The first column get sortet right since its get sorted by date and it doesn't make me any problems. 
  The second column however has basically the same values as the first one BUT only the Time in Hours:Minutes.
  The third column makes some calculations with the time and also fetches Time.
  Since I dont save these values I dont know how to sort this by time! </p>
  
  <p>Example would be 12:00 comes after 07:00 and before 14:35.
  How can I achieve this?</p>