title: Compare current Date with given Date Java
body: <p>My date time formatter is , &quot;yyyy-MM-DD&quot;</p>
  <pre><code> SimpleDateFormat dateFormatter = new SimpleDateFormat(&quot;yyyy-MM-DD&quot;)
  </code></pre>
  <p>I want to check the date is later than today's date or not. I checked it using this validation.</p>
  <pre><code>if(dateFormatter.format(given_Date).compareTo(dateFormatter.format(new Date())) &gt; 0){ ...}
  </code></pre>
  <p>But every time this returns false when the given date is later or not. Can anyone help with this me, please?</p>