I need to compare date ranges the result should be between start date and end date. I am using

Sharepoint:DateTimeControl picker and get the date using jquery,

then converted date like

startDate  =  startDate.getFullYear()+"-"+(startDate.getMonth()+1)+"-"+startDate.getDate()+'T00:00:01Z';  

endDate = endDate.getFullYear()+"-"+(endDate.getMonth()+1)+"-"+endDate.getDate()+'T00:00:01Z';

The below is my query for comparisions

    <FieldRef Name="Created" />
    <Value IncludeTimeValue="FALSE" Type="DateTime">2015-5-28T00:00:01Z</Value>
    <FieldRef Name="Created" />
    <Value IncludeTimeValue="FALSE" Type="DateTime">2015-7-8T00:00:01Z</Value>

I am getting error

"Value doesnot fall within the range exception"

  • IDK if it will matter, but the May and July months should be zero padded to comply with UTC format – Eric Alexander Jul 8 '15 at 12:55
  • Thanks for the reply !!!. can you pls explain how can i achieve that. ? – Vijay Jul 8 '15 at 13:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.