title: How to order dates in Google Table Chart using PHP?
body: <p>I'm creating a table using Google Table Charts and PHP. 
  The table code is:</p>
  
  <pre><code>google.charts.load('current', {'packages':['table']});
  google.charts.setOnLoadCallback(drawTable);
  
    function drawTable() {
          var data = google.visualization.arrayToDataTable([
            &lt;?php echo $dados; ?&gt;
            ]);
    var table = new google.visualization.Table(document.getElementById('table_div'));
    data.sort({column: 0, desc: true});
    table.draw(data, {showRowNumber: false, width: '100%', height: '100%'});
  }
  </code></pre>
  
  <p>The PHP code (that gets the data) is:</p>
  
  <pre><code>$dados = "['Data','InfoX','InfoY'],";
  for($i = 0; $i &lt; count($vet); $i++){
    $original_Date = $vet[$i][0];
    $New_Date = date("d/m/Y", strtotime($original_Date));
  
    $dados .= "['".$New_Date."',".$vet[$i][2].",".$vet[$i][3].','."]";
    if ($i+1 &lt; count($vet)){
    $dados .= ",";
  }
  </code></pre>
  
  <p>Currently, the table looks like this:
  <a href="https://i.stack.imgur.com/Ns57u.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ns57u.png" alt="enter image description here"></a></p>
  
  <p>As you can see, I have a problem with the way the first column is sorted (right now, it is ordering first by the day, then the month and the year). </p>
  
  <p>I need to order the first column chronologically (year-month-day), but show it in a dd/mm/yyyy format (in HTML, it is like when you use <code>data-search</code> and <code>data-order</code>). Is there any option custom propriety or option that I need to use to solve my issue?</p>
  
  <p>Thanks in advance for the answers and feel free to ask for more details if you need it.</p>