title: how to retrieve a sql datetime object with a php $row?
body: <p>For instance:</p>
  
  <pre><code>$sql = "SELECT * FROM db";
  $query = sqlsrv_query($conn, $sql);
  
  while($row = sqlsrv_fetch_array($query)){
      echo "$row[date_column]";
  }
  </code></pre>
  
  <p>will crash</p>
  
  <p>Most of the answers I've found are assuming you want to order your query by a datetime, but I just want to turn the datetime object into a string after I have all the rows.</p>
  
  <p>I don't really understand how to use the php date() function,
  I've tried:</p>
  
  <pre><code>echo date("m/d/Y",$row[date_column]); //prints nothing
  </code></pre>