title: How to convert text column to datetime in SQL
body: <p>I have a column that's a text:</p>
  <pre><code>Remarks (text, null)
  </code></pre>
  <p>A sample value is</p>
  <pre><code>&quot;5/21/2013 9:45:48 AM&quot;
  </code></pre>
  <p>How do I convert it to a datetime format like this:</p>
  <pre><code>&quot;2013-05-21 09:45:48.000&quot;
  </code></pre>
  <p>The reason for the conversion is that I was trying to get the total number of hours between a datetime column and the date stamp in the Remarks column. I was thinking of something like this:</p>
  <pre><code>Remarks (text, null) - Date_Sent (datetime, null)
  </code></pre>
  <p>To be clear, the columns represent the datetime an inquiry by a customer was sent (<code>Date_Sent</code>) and the last response made by a representative regarding the inquiry (<code>Response</code>), so for a sample of a <code>Date_Sent</code> having a value of <code>&quot;2013-05-21 08:00:00.000&quot;</code> and a <code>Response</code> with a value of <code>&quot;5/21/2013 10:00:00 AM&quot;</code>, I should get a value of <code>2.00</code> (2 hours). Unfortunately, in the database I'm working on, <code>Remarks</code> is a text and <code>Date_Sent</code> is a datetime.</p>