title: How to show varchar field in format "HHmmss" as hh:mm:ss SQL Server
body: <p>I have an old fingerprint program that keep the time of attendance from the zk machine in the format of <code>HHmmss</code></p>
  
  <p>What I need is to show it in the format of <code>HH:mm:ss</code>.</p>
  
  <p>I tried many functions with different parameter such as <code>CONVERT</code> and <code>CAST</code>
  with no way.</p>
  
  <p>BTW in oracle it's very easy with <code>TO_CHAR</code>.</p>
  
  <p>Finally I could do it with <code>SUBSTRING</code> every two letters and add ":" but it's so stupid.</p>
  
  <p>Thanks in advance.</p>