lundi 1 décembre 2014

How to query Range



Right now my code is is Equals in the query how can i prevent for example that if i book 2014-12-01 01:00 to 2014-12-02 01:00 This is a hole day, that no one else can for example book the same time but between any time and that range?


My code looks like this right now.



var camlQuery = new SP.CamlQuery();

camlQuery.set_viewXml('<View><Query><And><Eq><FieldRef Name=\'EventDate\' /><Value IncludeTimeValue=\'TRUE\' Type=\'DateTime\'>'
+ fromTime.toISOString() + '</Value></Eq><Eq><FieldRef Name=\'EndDate\' /><Value IncludeTimeValue=\'TRUE\' Type=\'DateTime\'>' + toTime.toISOString() +
'</Value></Eq></And></Where></Query></View>');


this.collListItem = list.getItems(camlQuery);
context.load(collListItem);







0 commentaires:

Enregistrer un commentaire