Quantcast
Channel: DreamFactory Forum - Latest topics
Viewing all articles
Browse latest Browse all 1524

Serious BUG Filter Date + Operator $and on Mongodb?

$
0
0

@abalad.x wrote:

I'm trying to do a query in a MongoDB database with date values but the following situation is occurring:

Filtering with date only goes all normal ...
Filter: filter:{"$and":[ {"dt_evento":{"$date":"2016-11-28T23:21:43.0000"}} ]}

{
"resource": [
{
"_id": "583cbc0819e33f052c019c06",
"bem_id": 22,
"dt_evento": {
"$date": "2016-11-28T23:21:43+0000"
},
"dt_gps": {
"$date": "2016-11-28T23:21:43+0000"
},
"latitude": -24.281786,
"longitude": -53.840725,
"velocidade": 0,
"direcao": 170,
"altitude": 341

Filtering with Data + ID :


Filter: filter:{"$and":[ {"dt_evento":{"$date":"2016-11-28T23:21:43.0000"}},{"bem_id": "58338261bab1178e0a393cec"} ]}

This error only happens when the $ and operator is used. Then I will need to do a Between between 2 dates

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 1524

Trending Articles