Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

retrive data between start and end date using CAML

$
0
0

Hi,

how can write CAML to retrive data between 2 dates (Startdate and end date).. like we use between in SQL server .(data image is below attached)

I write Query like this 

   osPQuery.Query = "<Where><And><And><Eq><FieldRef Name='Flag'/><Value Type = 'Number'>" + isactive + "</Value></Eq><Geq><FieldRef Name='StartDate'/><Value IncludeTimeValue='TRUE' Type='DateTime'> <Today/> </Value></Geq></And><Leq><FieldRef Name='EndDate'/><Value IncludeTimeValue='TRUE' Type='DateTime'> <Today/> </Value></Leq></And></Where> <OrderBy><FieldRef Name='ID' Ascending='FALSE'/></OrderBy>";

but not fetching any record....

Thanks



Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>