title: DateTime compare in django template
body: <p>I am having a problem while comparing two dates in Django templates.</p>
  
  <p>I have a date field in my model:</p>
  
  <pre><code> date_created = models.DateTimeField(auto_now=True)
  </code></pre>
  
  <p>I want to compare date_created by today date.  So this is what I am doing in my django template:</p>
  
  <pre><code>{% if x.for_meeting.date_created &lt; today%} # (x is the instance of MeetingRecord class where for_meeting field is Foreign key to Meeting table Where date_created)
  </code></pre>
  
  <p>Now I am calculating today in view like: </p>
  
  <pre><code>today =  datetime.now().strftime("%B %d, %Y,%I:%M %P")
  </code></pre>
  
  <p>Unfortunately I am not able to compare the dates.</p>
  
  <p>Please tell me what might I am doing wrong here. </p>