Putting Date Variable in filter in sharepoint rest api get request code example
Example: filter date wise in sharepoint rest api get request
var requestUrl = _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('" + _weaklyQuestion + "')/items?$select=Id,Title,answersOptions,dateFrom,dateTo&$filter=(datetime('" + ReFormatTime() + "') ge dateFrom) and (datetime('" + ReFormatTime() + "') le dateTo)&$top=1";