title: Convert MYSQL time from HH:MM:SS to HH:MM during PHP Select statement
body: <p>I am using a PHP Select statement to pull data from MySQL. The eventTime field is stored as TIME in the schema as HH:MM:SS but I only want HH:MM. I have tried using TIME_FORMAT(eventTime, '%H:%i') in the select statement but it does not work. Any ideas? I have even tried to convert the variable in PHP but I am stumped. Please help me identify what I'm missing. </p>
  
  <pre><code>$query="SELECT id,eventDate,eventTime, eventName FROM specialevents ORDER BY eventDate,eventTime ASC";
  
  $result=$mysqliConnection-&gt;query($query,MYSQLI_STORE_RESULT);
  
  while($row =$result-&gt;fetch_object())
    {
  
  
       $id=$row-&gt;id;
       $eventDate=$row-&gt;eventDate;
       $eventTime=$row-&gt;eventTime;
       $eventName=$row-&gt;eventName;
       $reportTime=$row-&gt;reportTime;
  
   echo '&lt;tr&gt;’; 
   echo '&lt;td class="tdId"&gt;&lt;input type="text" class="tbId" value="' . $id . '"/&gt;&lt;/td&gt;’; 
   echo '&lt;td class="tdEventDate"&gt;&lt;input type="text" class="tbEventDate" value="' . $eventDate . '"/&gt;&lt;/td&gt;’; 
   echo '&lt;td class="tdEventTime"&gt;&lt;input type="text" class="tbEventTime" value="' . $eventTime . '"/&gt;&lt;/td&gt;’; 
   echo '&lt;td class="tdEventName"&gt;&lt;input type="text" class="tbEventName" value=" ' . $eventTime . '"/&gt;&lt;/td&gt;’; 
   echo '&lt;td class="tdReportTime"&gt;&lt;input type="text" class="tbReportTime" value=" ' . $reportTime . '"/&gt;&lt;/td&gt;';   
  
  }
  </code></pre>