title: Error in Converting varchar to datetime
body: <p>I am trying to convert varchar to datetime, everything is ok when I use the convert function like this:</p>
  
  <pre><code>SELECT CONVERT(Datetime, '2016-01-01 00:00:00.000', 120)
  </code></pre>
  
  <p>but when I try to declare a varchar parameter and pass it to the function, I encounter the error</p>
  
  <pre><code>declare @input varchar = '2016-01-01 00:00:00.000'
  SELECT CONVERT(Datetime, @input, 120)
  </code></pre>
  
  <p>Any Help will be appreciated</p>