title: How to get current month and Last month in Redshift
body: <p>I am wondering if I can get last month and current month in Redshift? I looked at functions at <a href="http://docs.aws.amazon.com/redshift/latest/dg/r_CURRENT_DATE_TIME_functions.html" rel="noreferrer">http://docs.aws.amazon.com/redshift/latest/dg/r_CURRENT_DATE_TIME_functions.html</a></p>
  
  <p>For current month, I guess I can do the following:</p>
  
  <pre><code>LEFT(CURRENT_DATE, 7)
  </code></pre>
  
  <p>For previous month, I came up with the following:</p>
  
  <pre><code>LEFT(ADD_MONTHS(CURRENT_DATE, -1), 7)
  </code></pre>
  
  <p>But I am wondering if there is a simpler way of doing these? </p>