I'm trying query between two dates in MongoDB but I'm not getting anything back but I do have the correct data. I'm thinking that the date format might be wrong. Is it correct?
This is the query that I'm running
{ '$gte': Sun Feb 01 2015 02:00:00 GMT+0200 (IST),
'$lt': Tue Mar 03 2015 02:00:00 GMT+0200 (IST) }
and my JS query code looks like this
query.created = {$gte:new Date(this.props.startDate), $lt:new Date(this.props.endDate)};