Filter Created in SP REST API

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












5















I have this code below:



jQuery.ajax(
url: res3 + "/_api/web/lists('" + normlistid + "')/items('" + normid +"')?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu",
method: "GET",
headers:
"Accept": "application/json; odata=verbose"
,
success: function (data)
if(data.d)
if(data.d.QuemLeu.results)
for (var i = 0; i < data.d.QuemLeu.results.length; i++)
if(data.d.QuemLeu.results[i].Id == userId)
document.getElementById(itemHTML).style.visibility = 'hidden';
console.log("User Found.");
break;



else

console.log("User Not Found");


,
error: function (error)
console.log(error);

);


How can I filter if the created field (Sharepoint column) is greater than "2018/10/05"?










share|improve this question



















  • 1





    I don't understand you question but if you want to check if Created column is grater then '2018/10/05' (year/month/day?) usenew Date(data.d.Created) > new Date("2018-10-05").

    – Lukas Nespor
    Jan 10 at 12:25















5















I have this code below:



jQuery.ajax(
url: res3 + "/_api/web/lists('" + normlistid + "')/items('" + normid +"')?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu",
method: "GET",
headers:
"Accept": "application/json; odata=verbose"
,
success: function (data)
if(data.d)
if(data.d.QuemLeu.results)
for (var i = 0; i < data.d.QuemLeu.results.length; i++)
if(data.d.QuemLeu.results[i].Id == userId)
document.getElementById(itemHTML).style.visibility = 'hidden';
console.log("User Found.");
break;



else

console.log("User Not Found");


,
error: function (error)
console.log(error);

);


How can I filter if the created field (Sharepoint column) is greater than "2018/10/05"?










share|improve this question



















  • 1





    I don't understand you question but if you want to check if Created column is grater then '2018/10/05' (year/month/day?) usenew Date(data.d.Created) > new Date("2018-10-05").

    – Lukas Nespor
    Jan 10 at 12:25













5












5








5


1






I have this code below:



jQuery.ajax(
url: res3 + "/_api/web/lists('" + normlistid + "')/items('" + normid +"')?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu",
method: "GET",
headers:
"Accept": "application/json; odata=verbose"
,
success: function (data)
if(data.d)
if(data.d.QuemLeu.results)
for (var i = 0; i < data.d.QuemLeu.results.length; i++)
if(data.d.QuemLeu.results[i].Id == userId)
document.getElementById(itemHTML).style.visibility = 'hidden';
console.log("User Found.");
break;



else

console.log("User Not Found");


,
error: function (error)
console.log(error);

);


How can I filter if the created field (Sharepoint column) is greater than "2018/10/05"?










share|improve this question
















I have this code below:



jQuery.ajax(
url: res3 + "/_api/web/lists('" + normlistid + "')/items('" + normid +"')?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu",
method: "GET",
headers:
"Accept": "application/json; odata=verbose"
,
success: function (data)
if(data.d)
if(data.d.QuemLeu.results)
for (var i = 0; i < data.d.QuemLeu.results.length; i++)
if(data.d.QuemLeu.results[i].Id == userId)
document.getElementById(itemHTML).style.visibility = 'hidden';
console.log("User Found.");
break;



else

console.log("User Not Found");


,
error: function (error)
console.log(error);

);


How can I filter if the created field (Sharepoint column) is greater than "2018/10/05"?







sharepoint-online rest sharepoint-rest-api filter






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 10 at 12:20







KmDroid

















asked Jan 10 at 11:09









KmDroidKmDroid

786




786







  • 1





    I don't understand you question but if you want to check if Created column is grater then '2018/10/05' (year/month/day?) usenew Date(data.d.Created) > new Date("2018-10-05").

    – Lukas Nespor
    Jan 10 at 12:25












  • 1





    I don't understand you question but if you want to check if Created column is grater then '2018/10/05' (year/month/day?) usenew Date(data.d.Created) > new Date("2018-10-05").

    – Lukas Nespor
    Jan 10 at 12:25







1




1





I don't understand you question but if you want to check if Created column is grater then '2018/10/05' (year/month/day?) usenew Date(data.d.Created) > new Date("2018-10-05").

– Lukas Nespor
Jan 10 at 12:25





I don't understand you question but if you want to check if Created column is grater then '2018/10/05' (year/month/day?) usenew Date(data.d.Created) > new Date("2018-10-05").

– Lukas Nespor
Jan 10 at 12:25










4 Answers
4






active

oldest

votes


















5














SharePoint REST API endpoints take ISO formatted date string for filtering.



Try using below query for filtering on Date Field:




  1. To check greater than "2018/10/05":



    https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=(Created gt datetime'2018-10-05T00:00:00Z')




  2. To check greater than or equal to "2018/10/05":



    https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=(Created ge datetime'2018-10-05T00:00:00Z')



Answer For Updated Question:



Add one more IF statement inside if(data.d) like given below:



if(data.d)
if(new Date(data.d.Created) > new Date("2018-10-05"))
console.log("Items is created after '2018-10-05'");
else
console.log("Items is created before '2018-10-05'");
//Add your other code here







share|improve this answer

























  • Does this works for you?

    – Ganesh Sanap
    Jan 10 at 12:08











  • The thing is I need /items('193')/ to my code working. There is another way?

    – KmDroid
    Jan 10 at 12:10











  • Actually /items('193')/ gives you the single item from list. So you cannot apply filter on such endpoint. Can you tell us what is the exact requirement of yours??

    – Ganesh Sanap
    Jan 10 at 12:13











  • I edited my post

    – KmDroid
    Jan 10 at 12:20











  • Please accept and upvote the answer and create new question instead of editing the existing question as other users have already answered on this question(by reading the original question).

    – Ganesh Sanap
    Jan 10 at 12:23


















3














Just add



&$filter=Created gt '2018-10-05'


At the end of your endpoint



For example:



https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items('193')?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=Created gt '2018-10-05'


Gt operator means "greater than"



And also you can check all operators below:



Lt (less than)

Le (less than or equal)

Gt (greater than)

Ge (greater than or equal)

Eq (equal to)

Ne (not equal to)





share|improve this answer


















  • 1





    Hello, your filter is not working, is giving me the error "the query is not valid."

    – KmDroid
    Jan 10 at 11:35


















3














Add $filter to your query and use Created gt datetime'2018-10-05T00:00:00' or Created gt '2018-10-05'



/_api/web/lists('guid')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=Created gt '2018-10-05'





share|improve this answer




















  • 2





    Hello, your expression is not valid.

    – KmDroid
    Jan 10 at 11:38











  • Yes, you are right. I blindly copied your URL. The issue was with /items('193')/ it has to be only /items/.

    – Lukas Nespor
    Jan 10 at 11:45











  • Hmm, interesting. I did fixed it first and get down vote, awesome :D

    – Lukas Nespor
    Jan 10 at 12:09











  • The thing is I need /items('193')/ to my code working. There is another way?

    – KmDroid
    Jan 10 at 12:10











  • So what do you want to filter? Using /items(193)/ will give you only one item, so there is nothing to filter. Update your question please, because apparently you want something different.

    – Lukas Nespor
    Jan 10 at 12:12



















1














Use filter property $filter=Created gt '2018-10-17'






share|improve this answer




















  • 1





    Hello, your expression seems to be not valid.

    – KmDroid
    Jan 10 at 11:36











  • Now, is giving me "the query is not valid".

    – KmDroid
    Jan 10 at 11:39











  • You use this filter under Items: /_api/web/lists('guid')/items?$filter=Created gt '2018-10-17'

    – Zdeněk Vinduška
    Jan 10 at 11:48











  • The thing is I need /items('193')/ to my code working. There is another way?

    – KmDroid
    Jan 10 at 12:11






  • 2





    So you updated your post and now as I wroted, you need IF statement, cause you only need to check if Created is GT DATE. Thats everything.

    – Zdeněk Vinduška
    Jan 10 at 12:29










Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "232"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsharepoint.stackexchange.com%2fquestions%2f255543%2ffilter-created-in-sp-rest-api%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























4 Answers
4






active

oldest

votes








4 Answers
4






active

oldest

votes









active

oldest

votes






active

oldest

votes









5














SharePoint REST API endpoints take ISO formatted date string for filtering.



Try using below query for filtering on Date Field:




  1. To check greater than "2018/10/05":



    https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=(Created gt datetime'2018-10-05T00:00:00Z')




  2. To check greater than or equal to "2018/10/05":



    https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=(Created ge datetime'2018-10-05T00:00:00Z')



Answer For Updated Question:



Add one more IF statement inside if(data.d) like given below:



if(data.d)
if(new Date(data.d.Created) > new Date("2018-10-05"))
console.log("Items is created after '2018-10-05'");
else
console.log("Items is created before '2018-10-05'");
//Add your other code here







share|improve this answer

























  • Does this works for you?

    – Ganesh Sanap
    Jan 10 at 12:08











  • The thing is I need /items('193')/ to my code working. There is another way?

    – KmDroid
    Jan 10 at 12:10











  • Actually /items('193')/ gives you the single item from list. So you cannot apply filter on such endpoint. Can you tell us what is the exact requirement of yours??

    – Ganesh Sanap
    Jan 10 at 12:13











  • I edited my post

    – KmDroid
    Jan 10 at 12:20











  • Please accept and upvote the answer and create new question instead of editing the existing question as other users have already answered on this question(by reading the original question).

    – Ganesh Sanap
    Jan 10 at 12:23















5














SharePoint REST API endpoints take ISO formatted date string for filtering.



Try using below query for filtering on Date Field:




  1. To check greater than "2018/10/05":



    https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=(Created gt datetime'2018-10-05T00:00:00Z')




  2. To check greater than or equal to "2018/10/05":



    https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=(Created ge datetime'2018-10-05T00:00:00Z')



Answer For Updated Question:



Add one more IF statement inside if(data.d) like given below:



if(data.d)
if(new Date(data.d.Created) > new Date("2018-10-05"))
console.log("Items is created after '2018-10-05'");
else
console.log("Items is created before '2018-10-05'");
//Add your other code here







share|improve this answer

























  • Does this works for you?

    – Ganesh Sanap
    Jan 10 at 12:08











  • The thing is I need /items('193')/ to my code working. There is another way?

    – KmDroid
    Jan 10 at 12:10











  • Actually /items('193')/ gives you the single item from list. So you cannot apply filter on such endpoint. Can you tell us what is the exact requirement of yours??

    – Ganesh Sanap
    Jan 10 at 12:13











  • I edited my post

    – KmDroid
    Jan 10 at 12:20











  • Please accept and upvote the answer and create new question instead of editing the existing question as other users have already answered on this question(by reading the original question).

    – Ganesh Sanap
    Jan 10 at 12:23













5












5








5







SharePoint REST API endpoints take ISO formatted date string for filtering.



Try using below query for filtering on Date Field:




  1. To check greater than "2018/10/05":



    https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=(Created gt datetime'2018-10-05T00:00:00Z')




  2. To check greater than or equal to "2018/10/05":



    https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=(Created ge datetime'2018-10-05T00:00:00Z')



Answer For Updated Question:



Add one more IF statement inside if(data.d) like given below:



if(data.d)
if(new Date(data.d.Created) > new Date("2018-10-05"))
console.log("Items is created after '2018-10-05'");
else
console.log("Items is created before '2018-10-05'");
//Add your other code here







share|improve this answer















SharePoint REST API endpoints take ISO formatted date string for filtering.



Try using below query for filtering on Date Field:




  1. To check greater than "2018/10/05":



    https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=(Created gt datetime'2018-10-05T00:00:00Z')




  2. To check greater than or equal to "2018/10/05":



    https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=(Created ge datetime'2018-10-05T00:00:00Z')



Answer For Updated Question:



Add one more IF statement inside if(data.d) like given below:



if(data.d)
if(new Date(data.d.Created) > new Date("2018-10-05"))
console.log("Items is created after '2018-10-05'");
else
console.log("Items is created before '2018-10-05'");
//Add your other code here








share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 10 at 12:41

























answered Jan 10 at 11:51









Ganesh SanapGanesh Sanap

2,2433824




2,2433824












  • Does this works for you?

    – Ganesh Sanap
    Jan 10 at 12:08











  • The thing is I need /items('193')/ to my code working. There is another way?

    – KmDroid
    Jan 10 at 12:10











  • Actually /items('193')/ gives you the single item from list. So you cannot apply filter on such endpoint. Can you tell us what is the exact requirement of yours??

    – Ganesh Sanap
    Jan 10 at 12:13











  • I edited my post

    – KmDroid
    Jan 10 at 12:20











  • Please accept and upvote the answer and create new question instead of editing the existing question as other users have already answered on this question(by reading the original question).

    – Ganesh Sanap
    Jan 10 at 12:23

















  • Does this works for you?

    – Ganesh Sanap
    Jan 10 at 12:08











  • The thing is I need /items('193')/ to my code working. There is another way?

    – KmDroid
    Jan 10 at 12:10











  • Actually /items('193')/ gives you the single item from list. So you cannot apply filter on such endpoint. Can you tell us what is the exact requirement of yours??

    – Ganesh Sanap
    Jan 10 at 12:13











  • I edited my post

    – KmDroid
    Jan 10 at 12:20











  • Please accept and upvote the answer and create new question instead of editing the existing question as other users have already answered on this question(by reading the original question).

    – Ganesh Sanap
    Jan 10 at 12:23
















Does this works for you?

– Ganesh Sanap
Jan 10 at 12:08





Does this works for you?

– Ganesh Sanap
Jan 10 at 12:08













The thing is I need /items('193')/ to my code working. There is another way?

– KmDroid
Jan 10 at 12:10





The thing is I need /items('193')/ to my code working. There is another way?

– KmDroid
Jan 10 at 12:10













Actually /items('193')/ gives you the single item from list. So you cannot apply filter on such endpoint. Can you tell us what is the exact requirement of yours??

– Ganesh Sanap
Jan 10 at 12:13





Actually /items('193')/ gives you the single item from list. So you cannot apply filter on such endpoint. Can you tell us what is the exact requirement of yours??

– Ganesh Sanap
Jan 10 at 12:13













I edited my post

– KmDroid
Jan 10 at 12:20





I edited my post

– KmDroid
Jan 10 at 12:20













Please accept and upvote the answer and create new question instead of editing the existing question as other users have already answered on this question(by reading the original question).

– Ganesh Sanap
Jan 10 at 12:23





Please accept and upvote the answer and create new question instead of editing the existing question as other users have already answered on this question(by reading the original question).

– Ganesh Sanap
Jan 10 at 12:23













3














Just add



&$filter=Created gt '2018-10-05'


At the end of your endpoint



For example:



https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items('193')?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=Created gt '2018-10-05'


Gt operator means "greater than"



And also you can check all operators below:



Lt (less than)

Le (less than or equal)

Gt (greater than)

Ge (greater than or equal)

Eq (equal to)

Ne (not equal to)





share|improve this answer


















  • 1





    Hello, your filter is not working, is giving me the error "the query is not valid."

    – KmDroid
    Jan 10 at 11:35















3














Just add



&$filter=Created gt '2018-10-05'


At the end of your endpoint



For example:



https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items('193')?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=Created gt '2018-10-05'


Gt operator means "greater than"



And also you can check all operators below:



Lt (less than)

Le (less than or equal)

Gt (greater than)

Ge (greater than or equal)

Eq (equal to)

Ne (not equal to)





share|improve this answer


















  • 1





    Hello, your filter is not working, is giving me the error "the query is not valid."

    – KmDroid
    Jan 10 at 11:35













3












3








3







Just add



&$filter=Created gt '2018-10-05'


At the end of your endpoint



For example:



https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items('193')?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=Created gt '2018-10-05'


Gt operator means "greater than"



And also you can check all operators below:



Lt (less than)

Le (less than or equal)

Gt (greater than)

Ge (greater than or equal)

Eq (equal to)

Ne (not equal to)





share|improve this answer













Just add



&$filter=Created gt '2018-10-05'


At the end of your endpoint



For example:



https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items('193')?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=Created gt '2018-10-05'


Gt operator means "greater than"



And also you can check all operators below:



Lt (less than)

Le (less than or equal)

Gt (greater than)

Ge (greater than or equal)

Eq (equal to)

Ne (not equal to)






share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 10 at 11:19









Thales ChemenianThales Chemenian

4971312




4971312







  • 1





    Hello, your filter is not working, is giving me the error "the query is not valid."

    – KmDroid
    Jan 10 at 11:35












  • 1





    Hello, your filter is not working, is giving me the error "the query is not valid."

    – KmDroid
    Jan 10 at 11:35







1




1





Hello, your filter is not working, is giving me the error "the query is not valid."

– KmDroid
Jan 10 at 11:35





Hello, your filter is not working, is giving me the error "the query is not valid."

– KmDroid
Jan 10 at 11:35











3














Add $filter to your query and use Created gt datetime'2018-10-05T00:00:00' or Created gt '2018-10-05'



/_api/web/lists('guid')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=Created gt '2018-10-05'





share|improve this answer




















  • 2





    Hello, your expression is not valid.

    – KmDroid
    Jan 10 at 11:38











  • Yes, you are right. I blindly copied your URL. The issue was with /items('193')/ it has to be only /items/.

    – Lukas Nespor
    Jan 10 at 11:45











  • Hmm, interesting. I did fixed it first and get down vote, awesome :D

    – Lukas Nespor
    Jan 10 at 12:09











  • The thing is I need /items('193')/ to my code working. There is another way?

    – KmDroid
    Jan 10 at 12:10











  • So what do you want to filter? Using /items(193)/ will give you only one item, so there is nothing to filter. Update your question please, because apparently you want something different.

    – Lukas Nespor
    Jan 10 at 12:12
















3














Add $filter to your query and use Created gt datetime'2018-10-05T00:00:00' or Created gt '2018-10-05'



/_api/web/lists('guid')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=Created gt '2018-10-05'





share|improve this answer




















  • 2





    Hello, your expression is not valid.

    – KmDroid
    Jan 10 at 11:38











  • Yes, you are right. I blindly copied your URL. The issue was with /items('193')/ it has to be only /items/.

    – Lukas Nespor
    Jan 10 at 11:45











  • Hmm, interesting. I did fixed it first and get down vote, awesome :D

    – Lukas Nespor
    Jan 10 at 12:09











  • The thing is I need /items('193')/ to my code working. There is another way?

    – KmDroid
    Jan 10 at 12:10











  • So what do you want to filter? Using /items(193)/ will give you only one item, so there is nothing to filter. Update your question please, because apparently you want something different.

    – Lukas Nespor
    Jan 10 at 12:12














3












3








3







Add $filter to your query and use Created gt datetime'2018-10-05T00:00:00' or Created gt '2018-10-05'



/_api/web/lists('guid')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=Created gt '2018-10-05'





share|improve this answer















Add $filter to your query and use Created gt datetime'2018-10-05T00:00:00' or Created gt '2018-10-05'



/_api/web/lists('guid')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=Created gt '2018-10-05'






share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 10 at 11:40

























answered Jan 10 at 11:13









Lukas NesporLukas Nespor

1,245516




1,245516







  • 2





    Hello, your expression is not valid.

    – KmDroid
    Jan 10 at 11:38











  • Yes, you are right. I blindly copied your URL. The issue was with /items('193')/ it has to be only /items/.

    – Lukas Nespor
    Jan 10 at 11:45











  • Hmm, interesting. I did fixed it first and get down vote, awesome :D

    – Lukas Nespor
    Jan 10 at 12:09











  • The thing is I need /items('193')/ to my code working. There is another way?

    – KmDroid
    Jan 10 at 12:10











  • So what do you want to filter? Using /items(193)/ will give you only one item, so there is nothing to filter. Update your question please, because apparently you want something different.

    – Lukas Nespor
    Jan 10 at 12:12













  • 2





    Hello, your expression is not valid.

    – KmDroid
    Jan 10 at 11:38











  • Yes, you are right. I blindly copied your URL. The issue was with /items('193')/ it has to be only /items/.

    – Lukas Nespor
    Jan 10 at 11:45











  • Hmm, interesting. I did fixed it first and get down vote, awesome :D

    – Lukas Nespor
    Jan 10 at 12:09











  • The thing is I need /items('193')/ to my code working. There is another way?

    – KmDroid
    Jan 10 at 12:10











  • So what do you want to filter? Using /items(193)/ will give you only one item, so there is nothing to filter. Update your question please, because apparently you want something different.

    – Lukas Nespor
    Jan 10 at 12:12








2




2





Hello, your expression is not valid.

– KmDroid
Jan 10 at 11:38





Hello, your expression is not valid.

– KmDroid
Jan 10 at 11:38













Yes, you are right. I blindly copied your URL. The issue was with /items('193')/ it has to be only /items/.

– Lukas Nespor
Jan 10 at 11:45





Yes, you are right. I blindly copied your URL. The issue was with /items('193')/ it has to be only /items/.

– Lukas Nespor
Jan 10 at 11:45













Hmm, interesting. I did fixed it first and get down vote, awesome :D

– Lukas Nespor
Jan 10 at 12:09





Hmm, interesting. I did fixed it first and get down vote, awesome :D

– Lukas Nespor
Jan 10 at 12:09













The thing is I need /items('193')/ to my code working. There is another way?

– KmDroid
Jan 10 at 12:10





The thing is I need /items('193')/ to my code working. There is another way?

– KmDroid
Jan 10 at 12:10













So what do you want to filter? Using /items(193)/ will give you only one item, so there is nothing to filter. Update your question please, because apparently you want something different.

– Lukas Nespor
Jan 10 at 12:12






So what do you want to filter? Using /items(193)/ will give you only one item, so there is nothing to filter. Update your question please, because apparently you want something different.

– Lukas Nespor
Jan 10 at 12:12












1














Use filter property $filter=Created gt '2018-10-17'






share|improve this answer




















  • 1





    Hello, your expression seems to be not valid.

    – KmDroid
    Jan 10 at 11:36











  • Now, is giving me "the query is not valid".

    – KmDroid
    Jan 10 at 11:39











  • You use this filter under Items: /_api/web/lists('guid')/items?$filter=Created gt '2018-10-17'

    – Zdeněk Vinduška
    Jan 10 at 11:48











  • The thing is I need /items('193')/ to my code working. There is another way?

    – KmDroid
    Jan 10 at 12:11






  • 2





    So you updated your post and now as I wroted, you need IF statement, cause you only need to check if Created is GT DATE. Thats everything.

    – Zdeněk Vinduška
    Jan 10 at 12:29















1














Use filter property $filter=Created gt '2018-10-17'






share|improve this answer




















  • 1





    Hello, your expression seems to be not valid.

    – KmDroid
    Jan 10 at 11:36











  • Now, is giving me "the query is not valid".

    – KmDroid
    Jan 10 at 11:39











  • You use this filter under Items: /_api/web/lists('guid')/items?$filter=Created gt '2018-10-17'

    – Zdeněk Vinduška
    Jan 10 at 11:48











  • The thing is I need /items('193')/ to my code working. There is another way?

    – KmDroid
    Jan 10 at 12:11






  • 2





    So you updated your post and now as I wroted, you need IF statement, cause you only need to check if Created is GT DATE. Thats everything.

    – Zdeněk Vinduška
    Jan 10 at 12:29













1












1








1







Use filter property $filter=Created gt '2018-10-17'






share|improve this answer















Use filter property $filter=Created gt '2018-10-17'







share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 10 at 11:37

























answered Jan 10 at 11:15









Zdeněk VinduškaZdeněk Vinduška

1,040216




1,040216







  • 1





    Hello, your expression seems to be not valid.

    – KmDroid
    Jan 10 at 11:36











  • Now, is giving me "the query is not valid".

    – KmDroid
    Jan 10 at 11:39











  • You use this filter under Items: /_api/web/lists('guid')/items?$filter=Created gt '2018-10-17'

    – Zdeněk Vinduška
    Jan 10 at 11:48











  • The thing is I need /items('193')/ to my code working. There is another way?

    – KmDroid
    Jan 10 at 12:11






  • 2





    So you updated your post and now as I wroted, you need IF statement, cause you only need to check if Created is GT DATE. Thats everything.

    – Zdeněk Vinduška
    Jan 10 at 12:29












  • 1





    Hello, your expression seems to be not valid.

    – KmDroid
    Jan 10 at 11:36











  • Now, is giving me "the query is not valid".

    – KmDroid
    Jan 10 at 11:39











  • You use this filter under Items: /_api/web/lists('guid')/items?$filter=Created gt '2018-10-17'

    – Zdeněk Vinduška
    Jan 10 at 11:48











  • The thing is I need /items('193')/ to my code working. There is another way?

    – KmDroid
    Jan 10 at 12:11






  • 2





    So you updated your post and now as I wroted, you need IF statement, cause you only need to check if Created is GT DATE. Thats everything.

    – Zdeněk Vinduška
    Jan 10 at 12:29







1




1





Hello, your expression seems to be not valid.

– KmDroid
Jan 10 at 11:36





Hello, your expression seems to be not valid.

– KmDroid
Jan 10 at 11:36













Now, is giving me "the query is not valid".

– KmDroid
Jan 10 at 11:39





Now, is giving me "the query is not valid".

– KmDroid
Jan 10 at 11:39













You use this filter under Items: /_api/web/lists('guid')/items?$filter=Created gt '2018-10-17'

– Zdeněk Vinduška
Jan 10 at 11:48





You use this filter under Items: /_api/web/lists('guid')/items?$filter=Created gt '2018-10-17'

– Zdeněk Vinduška
Jan 10 at 11:48













The thing is I need /items('193')/ to my code working. There is another way?

– KmDroid
Jan 10 at 12:11





The thing is I need /items('193')/ to my code working. There is another way?

– KmDroid
Jan 10 at 12:11




2




2





So you updated your post and now as I wroted, you need IF statement, cause you only need to check if Created is GT DATE. Thats everything.

– Zdeněk Vinduška
Jan 10 at 12:29





So you updated your post and now as I wroted, you need IF statement, cause you only need to check if Created is GT DATE. Thats everything.

– Zdeněk Vinduška
Jan 10 at 12:29

















draft saved

draft discarded
















































Thanks for contributing an answer to SharePoint Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsharepoint.stackexchange.com%2fquestions%2f255543%2ffilter-created-in-sp-rest-api%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?