title: Month in MM using Month() in Hive
body: <pre><code>Select * from concat(YEAR(DATE_SUB(MAX(Column_name),60),MONTH(DATE_SUB(MAX(Column_name),60),-01)
  </code></pre>
  
  <p>The <code>month()</code> yields only <strong>single</strong> digit for months until September i.e Jan returns <code>1</code> instead of <code>01</code>. Need help in handling this.</p>
  
  <p>I am using this output to feed to another <code>SELECT</code> query using <code>TO_DATE</code>.</p>