When I extract data from a list and want to filter them, I use
"intraActive eq 1 and StartDate lt datetime'" + new Date().toISOString() + "' and OData__EndDate ge datetime'" + new Date().toISOString() + "'";
Full code:
var promise = web.getList(listUrl).items;
if (filter) {
promise = promise.filter(filter); //Filter is the code snippet above
}
I now want to use CAML to do the same thing
"<View><Query></Query></View>";
However, I have no clue about CAML. Any help?
caml
is simple. :-) You'd need to get the types in order (bool vs. text in the answers) and whether you'd need "only" the dates or have time included (seeIncludeTimeValue="True"
)