title: Converting varchar(6) in HHmmss format to sql time format
body: <p>How is it possible to convert something stored in <code>DB</code> as <code>varchar(6)</code> (e.g., 180000 which is actually in a format of <code>HHmmss</code>) to  time, I tried the following but wont work </p>
  
  <pre><code>select convert(time,'180000')
  select cast('180000' as time)
  </code></pre>