title: How to subtract months from YYYYMM string date in python?
body: <p>I have strings that are dates(<code>YYYYMM</code> such as: <code>201909</code>.</p>
  
  <p>In Python, how can I simply subtract one month?</p>
  
  <pre><code>from datetime import datetime
  
  Month = '201905'
  Month = datetime.strptime(Month, '%Y%m').date()
  Month1 = str(Month -1)
  Month2 = str(Month -2)
  Month3 = str(Month -3)
  Month6 = str(Month -6)
  Month12 = str(Month - 100)
  </code></pre>
  
  <p>This doesn't work, but I would like to be able to set the 'Month' variable to a string like '201905' and calculate various YYYYMM strings from there.</p>