title: Datetime current year and month in Python
body: <p>I must have the current year and month in datetime.</p>
  
  <p>I use this:</p>
  
  <pre><code>datem = datetime.today().strftime("%Y-%m")
  datem = datetime.strptime(datem, "%Y-%m")
  </code></pre>
  
  <p>Is there maybe another way?</p>