title: Extract datetime from string in T-SQL
body: <p>I have the following string stored in SQL:</p>
  
  <blockquote>
    <p>Application approved by John Doe - MDat30/01/2018 10:54:31</p>
  </blockquote>
  
  <p>using the following T-SQL function:</p>
  
  <pre><code>convert (datetime, substring(MD_SIGNATURE, charindex('/', MD_SIGNATURE,0)-2, 10),105) as MD_SIGN_DATE
  </code></pre>
  
  <p>This outputs the following:</p>
  
  <blockquote>
    <p>2018-01-30 00:00:00.000</p>
  </blockquote>
  
  <p>I need assistance in  getting the whole timestamp including the seconds parts like this:</p>
  
  <blockquote>
    <p>2018-01-30 10:54:31</p>
  </blockquote>
  
  <p>Thank you.</p>