title: Jquery return most recent date from table column
body: <p>I'm trying to use this function to get the most recent date value from my table. </p>
  
  <pre><code>function getdate() {
    var index = $('#csvtext table').find('th:contains("DATE")').index();
    var max = 0;
  
    $('#csvtext table tr td:eq(' + index + ')').each(function() {
      $this = parseInt( $(this).text() );
      if ($this &gt; max) 
        max = $this
    });
    return max;
  }
  </code></pre>
  
  <p>Table:</p>
  
  <pre><code>&lt;tbody&gt;
  &lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;17/10/2017&lt;/td&gt;&lt;td&gt;CA5533&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;15/10/2017&lt;/td&gt;&lt;td&gt;CA5533&lt;/td&gt;&lt;/tr&gt;
  &lt;/tbody&gt;
  </code></pre>
  
  <p>The problem is that <code>max</code> is returning only the first value from the date inside my column <code>DATE</code>.</p>
  
  <p>How can I return the value of most recent date from all values inside this column?</p>
  
  <p>Thanks!</p>