0

So I am currently trying to pass the request formatted like this:

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <GetListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">
      <listName>000</listName>
      <viewName>000</viewName>
      <query><Query>
            <Where>
                <And>
                <Eq><FieldRef Name='Status'/><Value Type='Text'>Needs To Be Run</Value></Eq>
                <Geq><FieldRef Name='Created' /><Value Type="Date">2016-11-09 20:08:27</Value></Geq>
                </And>
                </Where>
            </Query></query>
      <viewFields></viewFields>
      <rowLimit>150</rowLimit>
      <QueryOptions></QueryOptions>
      <webID></webID>
    </GetListItems>
  </soap12:Body>
</soap12:Envelope>

But currently it seems to ignore the time of the created field query. It seems to work with date, but not time.

How do i specify the time properly so that it filters things that it only shows items that were created after a specific time?

  • are you tried <Value Type="Datetime"> – Mohamed El-Qassas MVP Nov 9 '16 at 19:51
  • Yes. Datetime still does not seem to pass the time condition. – Bitz Nov 9 '16 at 19:54
  • try to set time like this 2016-11-09T20:08:27Z – Mohamed El-Qassas MVP Nov 9 '16 at 19:57
  • Still no luck. Using <Geq><FieldRef Name='Created' /><Value Type='Datetime'>2016-11-09T23:08:27Z</Value></Geq> still returns the record with the create date: ows_Created='2016-11-09 11:07:46' – Bitz Nov 9 '16 at 20:03
0

Try to set the date time value with this format yyyy-MM-ddTHH:mm:ssZwith IncludeTimeValue='True' attribute , so it should like

<Geq><FieldRef Name='Created' /><Value Type="DateTime" IncludeTimeValue='True'>2016-11-09T20:08:27Z</Value></Geq>

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.