title: mongoDB location of query failing
body: <p>I am trying to convert a huge set of dates to ISODate objects and storing it in the same collection and field. I am using the following query:</p>
  
  <pre><code>db.collection.find().forEach(function(element){
    element.StartTime = ISODate(element.StartTime);
    element.StopTime = ISODate(element.StopTime);
    db.collection.save(element);
  });
  </code></pre>
  
  <p>The query ran for about 10 minutes, and then gave an error:</p>
  
  <pre><code>2017-06-15T15:48:10.419+0200 E QUERY    [thread1] Error: invalid ISO date :
  ISODate@src/mongo/shell/types.js:65:1
  @(shell):2:23
  DBQuery.prototype.forEach@src/mongo/shell/query.js:501:1
  @(shell):1:1
  </code></pre>
  
  <p>I had a look into the entries in the DB and it looks like it did convert a lot of the data set, but I am having troubles now fixing the error and finding the location where it stopped. What I tried is using Studio3T to find where either "StartTime" or "StopTime" has a value of <code>2017-06-15T15:48:10.419+0200</code> or at least starts with <code>2017-06</code>, but as I expected (since there shouldn't be any data from June 2017 in there), it can't find anything.</p>
  
  <p>Now when I run the query again, it gives the error immediately. </p>
  
  <p>My question is if it's possible to find the document in the collection responsible for this error or what the cause might be. Are there recommendations for bulk operations like this preventing these errors?</p>