Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How to use date filters in JQL

Hi team,

I need to understand what does it mean by saying created>=-2h or updated <1d

Basically, I want to understand WHEN to use > and when to use <..... And when to use negative (-) and when to use positive (+) like -2d or +1d

Hope you got my needs. I know this may be a very basic question for most of you, but any help and even a documentation would be appreciated.

As a final ask, my requirement was basically to find out issues that were created between 2 am in the morning till 6 am the same day

Thanks in advance,


1 answer

1 accepted

1 vote
Answer accepted

> means after (literally the timestamp is greater, so it's later), and < means before (timestamp is smaller, so it's earlier).

Similarly, - means before, and + (or lack of sign) means after.

So, in your example of created >= -2h, that means created is after 2 hours ago, or within the last 2 hours.

Updated < 1d means updated is before 1 day from now (one day in the future), which will be all of your issues.

For your requirement, you could use this:

created >= startOfDay(2h) and created < startOfDay(6h)

startOfDay() is defined as midnight, so startOfDay(2h) means 2 hours after startOfDay(), or 2:00am. Similarly startOfDay(6h) means 6 hours after startOfDay(), or 6:00am.

Hope this helps! 

Thanks a lot. It helps.

Like Constanze Schmidt likes this

Hi Payne,

to clarify your answer: So I can either work with '>/<' or with ' -/+',  that is 'created >=- 2h' or 'created <= 2h' means the same, right?

Is there a preference / recommendation on what to use? 


And another question:

My query: 'duedate <= 6w' should list all issues where the due date is older than 6 weeks.  But it does not work correctly: I also get issues where the due date is just 3 or 2 weeks overdue.   

Would be great if you could help me with that:-)

Hi Constanze,

No, created >= -2h and created <= 2h are not interchangeable; try them both, and you'll see.

Similarly, duedate <= 6w is not correct for finding issues where the due date is older than 6 weeks; instead, you should use duedate >= -6w


Like Constanze Schmidt likes this

Hi Payne, thanks for clarifying:-)

Obviously I can´t quite get my head around this🙈. 

Did I get it right?

  • Created >= -2h:  created after 2 hours ago
  • Created <= 2h: created between now and 2 hours from now
  • Created >= 2h: created after 2 hours from now
  • created <= -2h: created between 2 hours ago and now


  • Duedate <= 6w:   Due between today and six weeks from now  (between 30.04.2021 and 15.05.2021)
  • Duedate <= -6w:  Due 6 weeks ago or earlier (before 14.03.2021)
  • Duedate >= 6w:  Due in six weeks from now on or later (after 15.05.2021)
  • Duedate >= -6w:  Due between today and 6 weeks earlier (between 14.03.2021 and 30.04.2021)

The best way I suggest for you to confirm these is to try them and sort the results by the relevant field (e.g. created >= -2h ORDER BY created asc [or desc]) and view the oldest and newest issues; that'll help you confirm whether each query is behaving as you think it is.

What does AFTER -2h mean? JQL allows this, too.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira Software

Upcoming changes to epic fields in company-managed projects

👋 Hi there Jira Community! A few months ago we shared with you plans around renaming epics in your company-managed projects. As part of these changes, we highlighted upcoming changes to epics on...

14,097 views 34 44
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you