title: Formatting Datetime Column
body: <p>I have a table called FcData and the data looks like:</p>
  
  <pre><code>Op_Date  
  
  2011-02-14 11:53:40.000 
  2011-02-17 16:02:19.000 
  2010-02-14 12:53:40.000 
  2010-02-17 14:02:19.000 
  </code></pre>
  
  <p>I want the output in the mm/yyyy format sample output should be:</p>
  
  <pre><code>Op_Date
  
  02/2011
  02/2011
  02/2010
  02/2010
  </code></pre>
  
  <p>I wrote query like :</p>
  
  <pre><code>SELECT CONVERT(VARCHAR,DATEPART(mm,Op_Date
  )) + '/' + CONVERT(VARCHAR,DATEPART(yyyy,Op_Date))
   FROM Fcdata
  </code></pre>
  
  <p>But I am getting output as:</p>
  
  <pre><code>Op_Date
  
  2/2011
  2/2011
  2/2010
  2/2010
  </code></pre>
  
  <p>Can anyone help me?</p>