The following where clause works:
{'DateStart': {"$gte": "2014-07-14 00:00:00.000"}}
I want to replace the date part with the current date. Is there a current date function I can call? eg.
{'DateStart': {"$gte": CurrentDate()}}
The following where clause works:
{'DateStart': {"$gte": "2014-07-14 00:00:00.000"}}
I want to replace the date part with the current date. Is there a current date function I can call? eg.
{'DateStart': {"$gte": CurrentDate()}}
You can do that with JavaScript.. just search for the right function. There are also libraries out there that can help you.
Ok so i've found some other references and have modified very slightly to get
var d = new Date();
d.setDate(d.getDate());
var dateStr = d.toISOString();
return '{"DateStart":{"$gte":"'+ dateStr +'"}}';
dumb question, where do i put it?
I'm in the query_service, test tab and putting this in the where clause but it's failing
In the Tab tab you place actual values. You can place this code when you map, in the JavaScript function.
Worked it out.
I put it in the Page\Data Tab\Request Tab in the Where statement using JS.
Thanks for your help.