title: Mysql SEC_TO_TIME without trailing seconds - Solution Found
body: <p>I have a Mysql table that stores dates in the format (YYYY-MM-DD HH:MM:SS).  </p>
  
  <p>What i want is to SUM the HH:MM:SS part for the selected rows, so as i found in another post i use the query</p>
  
  <pre><code>SELECT SEC_TO_TIME(SUM(TIME_TO_SEC(date))) FROM table
  </code></pre>
  
  <p>This query works. It sums the part that i want and returns it in the format HH:MM:SS.  </p>
  
  <p>My question is if its possible to strip of the seconds from the result.  </p>
  
  <p>I have to do this in the query, as the CMS that i use  doesn't allow me to use php on this part.</p>
  
  <p>By the way it would be amazing if i could return the result in days, hours and minutes in case the sum is greater that 24 hours.</p>
  
  <p>Thanks in advance</p>
  
  <p><strong>For anyone interested i found the solution</strong>  </p>
  
  <pre><code>SELECT TIME_FORMAT(SEC_TO_TIME(SUM(TIME_TO_SEC(hours))),'%H:%i' ) FROM table
  </code></pre>