1

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.

0

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 + "\")";

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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