title: How to extract month in double digit format from date column in SQL Server?
body: <p>I need to extract month in the form of double digits from my database table in SQL Server.</p>
  
  <pre><code>SELECT 
     Cast(datepart(month, prod_date) as nvarchar(10))
  FROM myTbl
  </code></pre>
  
  <p>what I got:  </p>
  
  <pre><code>1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
  </code></pre>
  
  <p>what I need:  </p>
  
  <pre><code>01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12
  </code></pre>
  
  <p>What is the best way to achieve that?</p>