Thursday, 29 August 2019

SPQuery: How to fetch SharePoint list data for a particular date?


startDate = "2019-8-27";
endDate = "2019-8-27":

"<Query>"+
  "<Where>"+
    "<And>"+
        "<Leq><FieldRef Name='Some_x0020_DATE'/><Value Type='DateTime'>"+endDate+"T23:59:00.000Z</Value></Leq>"+
        "<Geq><FieldRef Name='Some_x0020_DATE'/><Value Type='DateTime'>"+startDate +"T00:00:00.000Z</Value></Geq>"+
     "</And>"+
  "</Where>"+
"</Query>";

No comments:

Post a Comment