title: How to get last one week data from mongo collection where date is stored in string format?
body: <p>I am using mongoDB version 3.4 .<br>
  I have a collection where date is stored in String format <code>YYYY-mm-dd</code>.   I need to get last week data from this collection.  </p>
  
  <pre><code>new Date(new Date().setDate(new Date().getDate()-7)) 
  </code></pre>
  
  <p>returns me the date in ISO date format , which cannot be used to compare with date in string format.<br>
  I cannot use date formatter as it is not supported by version 3.4.<br>
  Is there a way to get current date is in string format and use it in the query?<br>
  And also , I need only date , without timestamp.</p>