title: MongoDB comparing dates only without times
body: <p>How do I query for a date field in MongoDB with the date only, and not times?  For example, if MongoDB stores July 7, 2015 with <em>any</em> time, I want to match that day only with today's date.</p>
  
  <p>In MySQL, I would do <code>SELECT col1, col2 FROM table WHERE DATE(date_field) = DATE(NOW());</code></p>
  
  <p>Notice how MySQL has a function to change the <em>date_field</em> to the date only during matching.  Can I do this in MongoDB with a similar function during matching? Like <code>Collection.find({ dateonly(datetimefield): dateonly(new Date() });</code> or something of the like?</p>
  
  <p>I understand Mongo stores date/times in GMT, so I would also have to convert the stored GMT date+time from GMT to Local before matching the date only, but to get me started, would like to know if I can strip the time off of a date match.  For example, if GMT now is July 8 at 03:00 but Local Eastern Time US is July 7 at 23:00 then I would want to match July 7.</p>