title: SQL: Add space before AM/PM after military time conversion
body: <p>I researched everywhere about this but I cannot seem to find it.</p>
  
  <p>I have a column called OPEN_TIME which contains military time such as:</p>
  
  <pre><code>1900-01-01 23:00:00.000
  </code></pre>
  
  <p>I only want to extract the time, which I did successfully by doing:</p>
  
  <pre><code>LTRIM(RIGHT(CONVERT(varchar, OPEN_TIME, 100), 7))
  </code></pre>
  
  <p>However, this gives me a time of:</p>
  
  <pre><code>11:00PM
  </code></pre>
  
  <p>I would like to put a space before AM/PM so that it looks like:</p>
  
  <pre><code>11:00 PM
  </code></pre>
  
  <p>Not sure if this is as simple as it looks? Any advice would be appreciated.</p>