title: Cast integer with hour to time in PostgreSQL
body: <p>I have a number passed as <code>integer</code> and would like to convert it to <code>time</code>, and use this number as hour.</p>
  
  <p>I have found solutions for using a number as minutes, but I'm not familiar with PostgreSQL syntax. Not sure what to do here:</p>
  
  <pre><code>select CAST(to_char(czas, 'FM99909:99') AS TIME WITHOUT   
  TIME ZONE)::TIME from test
  </code></pre>
  
  <p>The result would be:</p>
  
  <pre><code>00:15:00
  </code></pre>
  
  <p>But I'm looking for a way to make it:</p>
  
  <pre><code>15:00:00
  </code></pre>
  
  <p>I have been working with MS SQL for quite a while, I'm surprised how much more complex PostgreSQL syntax is.</p>