I've built the following query to retrieve articles in Sharepoint:

(-PublishingExpirationDate<yesterday OR EmptyEndDate:0) 
(PublishingStartDate<2015-09-29 OR EmptyStartDate:0)

I read the syntax reference, but didn't find what I need: https://msdn.microsoft.com/EN-US/library/office/ff394606.aspx

Is there a method to replace a hard coded date with today's date and time, instead of 'today', 'yesterday' or a date?

  • You don't want to use TODAY ?
    – Asad Refai
    Sep 29, 2015 at 13:38
  • 1
    I am looking for a solution with date and (especially) time
    – Citizen SP
    Sep 29, 2015 at 13:40
  • Are you looking for something to get current time(eg: now ), instead of Today?
    – Unnie
    Sep 29, 2015 at 15:08
  • @Unnie Yes I do
    – Citizen SP
    Sep 30, 2015 at 6:57

2 Answers 2


Through KQL it is only possible to query by day ranges ie Today,yesterday etc. If you want to tune it further to limit results by exact current time, then you will have to use FQL instead. See this blog on the same.


You can use the KQL syntax to include "today" in your query to get today's date.

afaik, there is no term for the current time.

REF: KQL Syntax https://msdn.microsoft.com/en-us/library/office/ee558911.aspx

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.