title: can't compare datetime.datetime to unicode
body: <p>I need to compare my input time with current time. If my input time is older than 5 days, I will do <code>d = X_value</code>. Otherwise, <code>d = Y_value</code>. The format of my input time like this:</p>
  
  <pre><code>my_input__time: 2017-07-05 22:52:00+00:00 
  </code></pre>
  
  <p>my view.py looks like this:</p>
  
  <pre><code>import datetime
     five_days_ago = datetime.datetime.now() - datetime.timedelta(5)
  
     if my_input_time &lt; five_days_ago:
           d = X_value
     else:
           d = Y_value
  </code></pre>
  
  <p>I am getting TypeError:can't compare datetime.datetime to unicode. How do I convert <code>my_input_tine</code> and <code>five_dys_ago</code> into same format so I can compare?</p>