title: String of date time convert to date time in SQL Server
body: <p>I have this string which is a combination of date and time but in string format meaning that it has no space. I parsed it from a very long string but I now have or need to convert it to a standard date and time.</p>
  
  <p>This is my string for date and time:</p>
  
  <pre><code>141007024755
  </code></pre>
  
  <p>This is how I parsed it from a very long string of data</p>
  
  <pre><code>[date&amp;time] = SUBSTRING(@ProductCode, 27, 12)
  </code></pre>
  
  <p>This is the format I'm expecting but can't do it.</p>
  
  <pre><code>2014-10-07 02:47:55.000
  </code></pre>
  
  <p>Can anyone give me a hint on how to do this? An advice perhaps.</p>
  
  <p>Thanks.</p>