title: Converting Integer into time value, using SQL
body: <p>So I am using the following SQL search to add all time values in a database in the hours field of the logbook database:</p>
  
  <pre><code>SELECT SUM(hours) FROM logbook
  </code></pre>
  
  <p>But there is a problem as I recieve the output:</p>
  
  <pre><code>SUM(hours)
  48514
  </code></pre>
  
  <p>Which is almost there!</p>
  
  <p>What I really need it to do is this:</p>
  
  <pre><code>04:85:14
  </code></pre>
  
  <p>Which is in HH:MM:SS</p>
  
  <p>and then from there, recognise that the MM is > 59 and therefore round the HH up by one, and in saying this prepare to do this to all of the 3 sections: HH MM SS.</p>
  
  <p>But I have no idea how to do this!</p>
  
  <p>Thanks for the help guys!</p>