# Add support for date-based range queries in search

**URL:** https://discourse.jabref.org/t/add-support-for-date-based-range-queries-in-search/5622
**Category:** Features
**Tags:** groups
**Created:** [July 5, 2025, 2:03am UTC](https://discourse.jabref.org/t/add-support-for-date-based-range-queries-in-search/5622 "2025-07-05T02:03:57Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![ryan-carpenter](https://avatars.discourse-cdn.com/v4/letter/r/b487fb/32.png) [@ryan-carpenter](https://discourse.jabref.org/u/ryan-carpenter)
#### Post date: [July 17, 2025, 11:15am UTC](https://discourse.jabref.org/t/add-support-for-date-based-range-queries-in-search/5622/3 "2025-07-17T11:15:29Z")

</div>

Date filtering is a very common need and would be a useful enhancement (user opinion, not a maintainer).

I use options 1 and 2, sometimes together. Option 1 only works if you have `timestamp`, `creationdate`, and `modificationdate` showing in the entry table. You can enable these columns in preferences, if you have not already.

Regarding option 2, it’s true that filtering by day and month can get pretty complicated. However, filtering by year is easier and often useful without being precise.

In case you are unfamiliar,

- `\d` means any digit.
- `\d+` means one or more digits.
- `[0-9]` means any digit from `0` through `9`
- `[012379]` means 0, 1, 2, 3, 7, or 9

Here is a basic pattern for all the years in each decade.

```regex
199[0-9]
200[0-9]
201[0-9]
202[0-9]

```

Adjust the range to search within a decade.

- 2021 through 2024: `timestamp=~202[1-4]`

Combine with `|` (“or”) to make a multi-decade range.

- 2015 through 2025: `timestamp=~201[5-9]|202[0-5]`
- 2005 through 2025: `timestamp=~200[5-9]|201[0-9]|202[0-5]`

Note: These examples are designed for easy composition, not necessarily for performance (processing efficiency). That is, you can easily adjust the range of each decade without rearranging anything else, unlike in this example, which gives the same results as the last one above: `timestamp=~20\(\([01][5-9]\)|\([12][0-4]\)|\(25\)\)`

Searching with `=~` enables regex searches of the specified field. In this case, the regex button does not need to be activated (See [Searching within years - #5 by horror-vacui](https://discourse.jabref.org/t/searching-within-years/1512/5))

---

_[View the full topic](https://discourse.jabref.org/t/add-support-for-date-based-range-queries-in-search/5622)._
