title: Convert DD/MM/YYYY to YYYY-MM-DD at SQL server 2008 R2
body: <p>I am using SSRS 2008, one report have text fields which takes data as DD/MM/YYYY as input, but at query i would like it to covert as YYYY-MM-DD.</p>
  
  <p>I have tried with below code but could not succeed. </p>
  
  <pre><code>Declare @a varchar(20)= '27/03/2014'
  SELECT CONVERT(varchar(20), CAST(@a as DATE),126)
  </code></pre>
  
  <p>Output required as</p>
  
  <pre><code>2014-03-27
  </code></pre>