I have a requirement where I need to show items where Date lies in current year. So it would be like : Show all documents created in current year.

Is there a way to create a Today() managed property which always have current year? Or is there any way I can create a CSWP query to extract year from Today?


This seems to work for me:

ContentType:Document AND Created:"this year"

Placing this in the Query Text box in the Advanced search mode of the query builder yielded only documents created this year.

Check out: https://msdn.microsoft.com/en-us/library/office/ee558911.aspx for more info.

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.