title: SQL convert int to time
body: <p>I have a database that displays time as an integer. However I am wanting to output this into a report with the correct format. This is the format that I would like to change: </p>
  
  <p>eg. </p>
  
  <ul>
  <li><code>183000</code> would become <code>18:30</code></li>
  <li><code>500</code> would become    <code>00:05</code></li>
  <li><code>160000</code> would become <code>16:00</code></li>
  </ul>
  
  <p>and so on. </p>
  
  <p>I have had a look and CAST and CONVERT but not successfully managed to get this the time in the correct format. </p>