I have the following data.
{
deviceID: 186,
date: \"2014-3-15\"
}
{
deviceID: 186,
date: \"2014-3-14\"
}
{
deviceID: 186,
date: \"201
Its because the date field you are querying on is a string filed and not a Date(). In your mongo documents instead of a custom date string, insert javascript date objects into date field.
like
{ deviceID: 186,,"date": new Date(2012, 7, 14) }
and when you execute the remove do it like
db.coll.remove({date:{$lte:new Date(2012, 7, 14)}})