title: How to get the EOMONTH(End of month) of the current date using Python3
body: <p>I have a SQL server stored procedure and I am trying to replicate it using python. One of the things I am trying to replicate is the following function:</p>
  
  <pre><code>DECLARE @Anchor_DT as DATE =EOMONTH(Getdate(),-1);
  </code></pre>
  
  <p>Here is what I have tried in Python3:</p>
  
  <pre><code>import datetime
  datetime.date (2000, 3, 1) - datetime.timedelta (days = 1)
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>datetime.date(2000, 2, 29)
  </code></pre>
  
  <p>The thing is, I have to enter the date (200,3,1). I want to be able to pick up the current date and output the End of month. Here is what I tried but to no avail:</p>
  
  <pre><code>import datetime
  datetime.date.now() - datetime.timedelta (days = 1)
  </code></pre>
  
  <p>Any suggestions or recommended solutions?</p>