Search for posts created within a certain timeframe

Sometimes you may want to scope searches to a subset or range of dates. Our search interface supports before and after search clauses. They accept a full date, name of month or day of week.

Examples:

  • before:june hashtag - Posts with the search term hashtag posted before last June

  • before:2014 category:bug order:latest - Posts in the bug category created prior to 2014

  • after:friday broken - Posts created after last Friday with the word broken in them

  • after:2016-01-12 before:2016-01-20 happy - Posts created after 12th of Jan 2016 and before 20th of Jan 2016 with the word happy

  • after:june before:july in:first composer - Searches the first post in topic created from last June for the word composer

  • after:10 before:8 thing - Posts containing the word thing that were posted between 8 and 10 days ago.

All dates are in UTC, we always use beginning of day UTC as the start time for any period.

The filter applies to created_at date of posts, not to the date a topic is created. If you need to filter on topic creation use in:first

12 Likes

What units are available for after: and before: searches? I see units defaults to days, can we get sub-day resolution without specifying a full qualified date?

My specific use case: I wish to return post that are at least 2 hours old. I intend to use in:first to pick up topics created more than 2 hours ago.

I tried before:2h, before:120m and before:02:00:00 but none of them worked.

The reason: our support team want to give community members a chance to answer questions before they jump in and try and resolve requests for help.

1 Like

A data explorer report made available to your support team may be a more suitable option for this if you need it for a shorter time than a day. They could then add it to their sidebar and have it on-hand to run as and when. :+1:

2 Likes