Wednesday, April 1, 2015

Timezone offset comparisons in CAML with UTC parameter

While querying for events in a list which fall under a specified time period, the infopath form works correctly in client side editor, but fails when deployed to a list in SharePoint 2010 server. This was due to daylight saving time conversion of time values entered in our custom infopath form while generating CAML queries. To correctly check values in CAML query a paramter StorageTZ has to be added to the CAML query date time value as shown below

<Where>
  <Gt>
    <FieldRef Name='Created' />
    <Value Type='DateTime' IncludeTimeValue='TRUE' StorageTZ='TRUE'>
      2012-10-24T21:30:46Z
    </Value>
  </Gt>
</Where>

No comments:

c# httpclient The remote certificate is invalid according to the validation procedure: RemoteCertificateNameMismatch

 If we get this error while trying to get http reponse using HttpClient object, it could mean that certificate validation fails for the remo...