title: How to get only hours and minutes from phpmyadmin CURRENT_TIMESTAMP
body: <p>I have a form where you can fill out Firstname, Lastname etc. And the information will get sent to a database along with the date (yyyy-mm-dd hh-mm-ss). In my table it will display the full date but i only want it to display the hours and seconds. But year, month etc. in the database.</p>
  
  <p>So how do i only fetch the hours and minutes from the database and display it in a table?</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;tr&gt;
      &lt;th&gt;dato&lt;/th&gt;
      &lt;th&gt;Båtnr&lt;/th&gt;
      &lt;th&gt;Fornavn&lt;/th&gt;
      &lt;th&gt;Etternavn&lt;/th&gt;
      &lt;th&gt;Tid&lt;/th&gt;
      &lt;th&gt;Kr&lt;/th&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>PHP:</p>
  
  <pre><code>&lt;?php
      $sok = @$_POST['searchh'];
      $sql = "SELECT dato, baatnr, fornavn, etternavn, tid, kr FROM utleie WHERE baatnr     LIKE '%$sok%' or fornavn LIKE '%$sok%' or etternavn LIKE '%$sok%' or tid LIKE     '%$sok%'";
      $result = $conn-&gt; query($sql);
  
  if ($result-&gt; num_rows &gt; 0) {
      while ($row = $result-&gt; fetch_assoc()) {
          echo "&lt;tr&gt;&lt;td&gt;". 
          $row["dato"] ."&lt;/td&gt;&lt;td&gt;".
          $row["baatnr"] ."&lt;/td&gt;&lt;td&gt;". 
          $row["fornavn"] ."&lt;/td&gt;&lt;td&gt;". 
          $row["etternavn"] ."&lt;/td&gt;&lt;td&gt;". 
          $row["tid"] ."&lt;/td&gt;&lt;td&gt;". 
          $row["kr"] ."&lt;/td&gt;&lt;/tr&gt;";
      }
  echo "&lt;/table&gt;";
  }
  else {
      echo "0 results";
  </code></pre>
  
  <p>database date <a href="https://i.stack.imgur.com/pTdaN.png" rel="nofollow noreferrer">enter image description here</a></p>