i'm struggling to get a suitable REST query that works to retrieve item that were created in the current year.But i would also like to go back between years. for instance have a drop down that i could choose a previous years and then all items that were
created in that year would be retrieved.
var requestUri = _spPageContextInfo.webAbsoluteUrl +"/_api/Web/Lists/getByTitle('NPT Tickets')/items?$select=Loc,Time_x0020_Lost,Created,Category,Ticket_x0020_By/Title&$Expand=Ticket_x0020_By/Title&$filter=Created ge datetime"'+currentyear+"'";Not sure where to start with this but, a start will be just to get the query to retrieve all item created this year and then think of how to retrieve items created the previous year.
Any assistance will be much appreciated