title: TSQL: datetime from character string error
body: <p>There are some posts related to this but I'm so new to TSQL that I cannot make sense of them so please excuse me.</p>
  
  <p>My procedure has:</p>
  
  <pre><code>    BEGIN TRY
  
          INSERT INTO  dbo.myprocedure(
           Mydate
  
       )
       VALUES(
       CONVERT(DATETIME, @mydate, 102)
  )
  </code></pre>
  
  <p>If I execute it this way: </p>
  
  <pre><code>EXEC mydbo.dbo.myprocedure @mydate = 'May 8 2012 9:21AM'  
  </code></pre>
  
  <p>I get this error:
  Conversion failed when converting datetime from character string.</p>
  
  <p>How can I solve this? </p>
  
  <p>Thanks a million  </p>