title: Convert varchar to date format
body: <p>I want to covert varchar (50) column to date format. I used following code:</p>
  
  <pre><code>Update [dbo].[KYCStatus062013] 
  Set [REGISTRATION_DATE_]= convert(datetime,[REGISTRATION_DATE_] ,103)
  </code></pre>
  
  <p>But there is an error that says:</p>
  
  <blockquote>
    <p>Msg 241, Level 16, State 1, Line 1 Conversion failed when converting
    date and/or time from character string.</p>
  </blockquote>
  
  <p>I want this format: dd-mmm-yyyy. I do not have any option to create another table / column so "update" is the only way I can use. Any help will be highly appreciated.</p>
  
  <p>Edit: my source data looks like this: </p>
  
  <pre><code>21-MAR-13 07.58.42.870146 PM  
  01-APR-13 01.46.47.305114 PM  
  04-MAR-13 11.44.20.421441 AM  
  24-FEB-13 10.28.59.493652 AM
  </code></pre>
  
  <p>Edit 2: some of my source data also contains erroneous data containing only time. Example:</p>
  
  <pre><code> 12:02:24
   12:54:14
   12:45:31
   12:47:22
  </code></pre>