title: Return Previous Month in SSIS Expression
body: <p>I am writing an SSIS Expression that creates a Date Key to be used with a DimDate table. 
  I need the Expression to return the previous Month not the Current month. </p>
  
  <pre><code>(DT_STR, 4,1252)YEAR(GETDATE()) + RIGHT("0" + (DT_STR, 2, 1252) MONTH(GETDATE()),2) + RIGHT("0" + (DT_STR, 2, 1252)  DAY( GETDATE()), 2)
  </code></pre>
  
  <p>I tried putting a -1 in the following, but it did not allow it to work. </p>
  
  <pre><code>RIGHT("0" + (DT_STR, 2, 1252)  MONTH( GETDATE()-1  ),2)
  
  RIGHT("0" + (DT_STR, 2, 1252)  MONTH( GETDATE()  )-1,2)
  
  RIGHT("0" + (DT_STR, 2, 1252)  MONTH( GETDATE()  ),2)-1
  </code></pre>
  
  <p>What am I doing wrong?</p>