문제

I have a kerywordquery in JS that is working but when i add {today-30} it does not.

This is working:

(RefinableStartDate<=Today AND RefinableEndDate>Today)

It does not when I add -30 days:

(RefinableStartDate<=Today AND RefinableEndDate>Today AND
RefinableStartDate>{Today-30})

Note: The 2nd line does actually work inside of a SP results source.

도움이 되었습니까?

해결책

because this is in JS i passed in the date -30 days in the correct format.

var date = new Date();
date.setDate(date.getDate() - 30);
var dateString = date.toISOString().split('T')[0];

query = " (RefinableStartDate<=Today AND RefinableEndDate>Today AND RefinableStartDate>\"" + dateString + "\")";
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top