Not able to get item collection by my CAML
in date range
, while able to get in simple CAML
query.
Please any body let me know what is the correct format of passing date string.
function check_Submission() {
this.clientContext = new SP.ClientContext.get_current();
var oList = clientContext.get_web().get_lists().getByTitle('Employee Sift Details');
var startDateFx ="2015-11-17T20:21:11Z";
var endDatFx ="2015-11-17T20:21:11Z";
var StrQuery = '<View Scope=\'RecursiveAll\'>' +
'<Query>' +
'<Where>' +
'<Geq>' +
'<FieldRef Name='Sift_x0020_Date' />' +
'<Value Type='DateTime' IncludeTimeValue='FALSE'>'+endDatFx+'</Value>' +
'</Geq>' +
'</Where>' +
'</Query>' +
'</View>';
var camlQuery = new SP.CamlQuery();
camlQuery.set_viewXml(StrQuery);
this.collListItem = oList.getItems(camlQuery);
clientContext.load(collListItem);
this.clientContext.executeQueryAsync(Function.createDelegate(this,this.onQuerySucceeded4), Function.createDelegate(this,this.onQueryFailed4));
}
function onQuerySucceeded4(sender, args) {
alert('Request sucwess');
}
function onQueryFailed4(sender, args) {
alert('Request failed. \nError: ' + args.get_message() + '\nStackTrace: ' + args.get_stackTrace());
}