title: mongodb Querying for a Date Range when date is saved as string
body: <p>I'm saving data into the bongo as bulk insert. The data that's an array of JSON object contain date, numeric, alphanumeric data all saved as string.</p>
  
  <p><em>Sample Data</em></p>
  
  <pre><code>[{
      "CARDNO": "661",
      "HOLDERNO": "661",
      "HOLDERNAME": "S",
      "IODATE": "4/1/2012",
      "IOTIME": "00:03:27",
      "IOGATENO": "01-3",
      "IOGATENAME": "FWork",
      "IOSTATUS": "Entry",
      "DEPARTMENTNO": "1",
      "UPDATE_STATUS": "1"
  }, {
      "CARDNO": "711",
      "HOLDERNO": "711",
      "HOLDERNAME": "P",
      "IODATE": "4/1/2012",
      "IOTIME": "04:35:33",
      "IOGATENO": "01-7",
      "IOGATENAME": "FDWork",
      "IOSTATUS": "Exit",
      "DEPARTMENTNO": "3",
      "UPDATE_STATUS": "1"
  }]
  </code></pre>
  
  <p><em>My Query</em></p>
  
  <p>var start = new Date(2012, 4, 15);
  var end = new Date(2012, 4, 1);</p>
  
  <pre><code>collection.find({
      "IODATE": {
          $gte: start,
          $lt: end
      }
  }).toArray(function (err, data) {
      if (err) {
          console.log(err);
      } else {
          console.log(data.length)
      }
      //res.send(data.length);
      res.send(JSON.stringify(data));
  });
  </code></pre>
  
  <p>It's not returning result, I think it is because the value of <code>"IODATE"</code> is in string inside db. </p>
  
  <p>How to work around this issue? I may need to do bulk insert since the data can be of 200 million or so. </p>