1

Its possible to know how many items will end this current month? with REST GET URL $filter=

Test GET URL: /_api/lists/getbytitle('nameList')/items?$filter=Date_x0020_de_x0020_remise%272017-02%27

list : how many item this month ?

id |  Name | date
 1 |  Test |  24/02/2017 00:00 <<<<<=======
 2 |  Test |  24/01/2017 00:00
 3 |  Test |  24/04/2017 00:00

return 1

Thx

4
  • What REST endpoint have you tried from the documentation? odata.org/documentation/odata-version-2-0/uri-conventions/… Commented Feb 14, 2017 at 10:42
  • i found $filter=start_x0020_Date le date time'2016-03-26T09:59:32Z' its only before or after the date but never this month (all month)
    – Nuno
    Commented Feb 14, 2017 at 10:55
  • So what happens when you filter on dates higher then previous months last day and lower then next months first day ?? (or this months first & last day if you do it with the 'le' and 'ge' statements) Commented Feb 14, 2017 at 13:32
  • i found a solution thx ! (count each item on current month on "success"
    – Nuno
    Commented Feb 15, 2017 at 8:37

1 Answer 1

0

Not sure if it can be done in REST, but you could also add a Calculated column to your list in Sharepoint with the calculation =MONTH([Created]) and use that instead.

Add another column for the year ( =YEAR([Created]) ) so you can sort and filter over the years

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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