0

I have a Search Result web part which is part of PnP modern search web part. Now I have a RefinableDate00 managed property which is linked to a SharePoint site column of type DateOnly, now using the following Query Template inside the Search Result web part, I am able to get the items which have their RefianbleDate00 = today date:-

{searchTerms} 
ContentType:"Carrier" 
(RefinableDate00=today)

but i also want to build another Search Result web part which show the items which have their RefinableDate00 = Tomorrow. I tried this:-

{searchTerms} 
ContentType:"Carrier" 
(RefinableDate00=today+1)

but this did not return any items.. any advice ,, how i can get tomorrow date inside Query template?

1 Answer 1

1

With PnP Modern Search v4 the syntax is: {Today+1}

So this should work:

{searchTerms} ContentType:"Carrier" RefinableDate00={Today+1}

Source: Tokens - PnP Modern Search (v4)

{Today+/- <integer value for number of days>}

A date calculated by adding/subtracting the specified number of days to/from the date when the query is issued. Date format is YYYY-MM-DD (Ex: {Today+5})

1
  • i thought that should work , but it will not return any result even that i have items which match the criteria Commented Aug 21 at 22:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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