title: How to convert strftime or string format to timestamp/Date in python?
body: <p>I am very new to Python coding. I was trying to get the start and end date of a month and then compare it with another date column in the same excel.</p>
  
  <p>I only need the date in <code>mm/dd/yy</code> format but do not need the time.
  The <code>final_month_end_date</code> is basically a string format which I compare with an actual date but it gives me an error saying </p>
  
  <blockquote>
    <p>"TypeError: Cannot compare type 'Timestamp' with type 'str'"</p>
  </blockquote>
  
  <p>I have also tried <code>.timestamp()</code> function but of no use.
  How can I resolve this problem?</p>
  
  <pre><code>import datetime as dt
  import strftime
  
  now1 = dt.datetime.now()
  current_month= now1.month
  current_year= now1.year
  month_start_date= dt.datetime.today().strftime("%Y/%m/01")
  month_end_date= calendar.monthrange(current_year,current_month)[1]
  final_month_end_date= dt.datetime.today().strftime("%Y/%m/"+month_end_date)
  </code></pre>