Page 3 of 3

Correct syntax for database request

Posted: Mon Mar 02, 2015 2:03 pm
by Joe Bohen

I changed the method on your advice 7 days ago!!!


Correct syntax for database request

Posted: Mon Mar 02, 2015 3:00 pm
by Evgene Karachevtsev

Joe,

i beg your pardon, it was my mistake. We corrected your project, now everything works correctly except this bug, we are working on it at the moment.


Correct syntax for database request

Posted: Tue Mar 03, 2015 9:11 am
by Joe Bohen

Hi Evgene, No problems let me know when you have sorted the bug out.


Correct syntax for database request

Posted: Thu Mar 05, 2015 9:28 am
by Joe Bohen

Do you have any idea when this bug will be sorted?


Correct syntax for database request

Posted: Fri Mar 06, 2015 6:32 am
by Egor Kotov6832188

Hello Joe,
Try you query one more time.
Add "$date" before actual date value
ex: {"_createdAt:{"$gte":{"$date": "2014-12-30T05:01:45.973Z"}}}


Correct syntax for database request

Posted: Fri Mar 06, 2015 2:29 pm
by Joe Bohen

Hi Egor,
I have attempted the query with the amended parameter which gives the same empty response. The generated where clause now looks like.

where:{"_createdAt":{"$gte":{"$date": "Thu Mar 05 2015 14:25:57 GMT+0000 (GMT Standard Time)"}}}


Correct syntax for database request

Posted: Mon Mar 09, 2015 2:50 am
by Yurii Orishchuk

Hi Joe,

Nope you have incorrect Date value.

Here is a correct example of JS code for "where" request parameter:

pre

var dateObject = new Date();
var whereObject = {"_createdAt": {$gt: {"$date": dateObject.toISOString()} } };
return JSON.stringify(whereObject);

/pre

Regards.


Correct syntax for database request

Posted: Tue Mar 10, 2015 10:21 am
by Joe Bohen

Hi Yuri,

Of course well done thank you for spotting that, everything is now working as expected.

Regards,
Joe