title: How to compare two different Dates?
body: <p>I've created a timestamp that get finished after 10 minutes inside my database, inside my template i also created a <strong>jinja set variable</strong> <code>{% set now = moment().format('DD-MM-YYYY hh:mm:ss') %}</code></p>
  
  <p>The timestamp date is : <strong>23-05-2017 19:50:00</strong></p>
  
  <p>My current date is : <strong>23-5-2017 19:42:22</strong></p>
  
  <p>If i want to compare timestamp with the current date , i get true every time even that the current date is less than the timestamp .</p>
  
  <p>Here is the code :</p>
  
  <pre><code>{% set now = moment().format('DD-MM-YYYY hh:mm:ss') %}
  &lt;h4&gt;{{moment().format('DD-MM-YYYY HH:mm')}}&lt;/h4&gt;
  &lt;h4&gt;{{appo.timestamp.strftime('%d-%m-%Y %H:%M:%S')}}&lt;/h4&gt;
  
  {% if now &lt; appo.timestamp.strftime('%d-%m-%Y %H:%M:%S') %}
  
    &lt;h5&gt;The appointment not finished yet.&lt;/h5&gt;
  
  {% elif now &gt; appo.timestamp.strftime('%d-%m-%Y %H:%M:%S')  %}
  
    &lt;h5&gt;The appointment already finished.&lt;/h5&gt;
  
  {% endif %}
  </code></pre>
  
  <p>Am always getting <strong>The appointment get finished.</strong></p>
  
  <p>Please, any suggestions !!!</p>