top of page

❓How to Write JQL query for date range

Unlock the full potential of Jira with our guide on using JQL queries for date ranges. Streamline your searches and boost productivity, dive in!

Table of content:

Preview Image JQL query for date range in Jira

Jira is really good at finding the stuff we need in our projects. But sometimes, when we search for things, it doesn't always show us what we expect. Therefore mastering the JQL query language is a must be for all the users. 

There are two possibilities for how to search in Jira. First of them is BASIC through the dropdown menu where one is able to set conditions for his search, however, not always will you find the desired condition in the preset options. Therefore there is also the advanced option where you are able to write your own conditions in JQL (Jira Query Language). Don’t worry if you are not any code wizard, there are few principles to follow so everyone is able to manage it unless we are talking about some very extensive and specific filters. Those might be harder to conduct and here we advise you to either contact Atlassian Solutions Partner or try harnessing the magic of Scriptrunner. 

Two options for Filters in Jira

In this post we will discuss JQL queries for date ranges so whenever you want to search your issues by the creation date you know how to do so. 

Issues created in March 2024 - Basic Filter

To search for issues created in a certain date range we can use the dropdown menu from Atlassian. There are also options like Within the last…, More than…, In the range…

Data range filter in Jira
Save filter window in Jira

Last month’s Issues with JQL

Use this JQL filter to see last month’s created issues in ascending order:

project= “project name” AND created > startOfMonth(-2) AND created < startOfMonth(-1) ORDER BY created ASC

In the First condition we specify the beginning of the period so for us the start of month before therefore startOfMonth(-2). In the second condition we specify the end of this period which is the beginning of this month so startOfMonth(-1). The last condition specifies the order which in this case is ascending.

Two months ago issues with JQL

project= “project name” AND created > startOfMonth(-3) AND created < startOfMonth(-2) ORDER BY created ASC

Selecting a specific time period (1-31 May) with JQL

project= “project name” AND created > 2023-05-01 AND created < 2023-06-01 

You can as well specify a time period by date to search for issues created in this time frame. We used 2023-06-01 because this condition filters all issues created before so we can’t use 2023-05-31 if we want issues from 31.5.2023 to be listed as well.

If one would like to search issues created in a certain time frame and resolved in a certain time frame simply add the resolve function

project= “project name” AND created > 2023-05-01 AND created < 2023-06-01 AND resolved >= 2023-06-01 AND resolved <= 2023-12-01

To view all the search functions within Jira check official Atlassian documentation for cloud, for data center.

If you want to learn more about filter in Jira, their creation and best practices check our Jira filters 2024 comprehensive guide.

Subtasks Navigation for Jira promo banner

More Jira Content

Join the Club

Join our email list and get access to specials deals and much more!

Thanks for submitting!

bottom of page