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 can I create a jql filter with time range between two dates




Is there a way I could filter an issue within a specific time but also it has an interval date?


Something like this:

Night Tickets

project = SO AND created > "2017/11/20 22:00" AND created < "2017/11/21 6:00"


I would like to know the number of tickets by night within a single day.

4 answers

1 accepted

14 votes
Answer accepted
Tarun Sapra Community Leader Nov 20, 2017

Hello Glenn,

For dynamic dates , you can do something like

project = SO and created > startOfDay("-2h") and createdDate <  startOfDay("+5h")

 This will give you night tickets for every day. I.e. tickets created between 10 pm (last day) and 5 am (of current day) 

I got it. Thanks  Tarun Sapra. 

The above query is really useful. How to get the same data for a week/month between 10 PM 5 AM?

Like Luis Calderón Zeña likes this

what's the difference between "created" and "createdDate"?

Like Chezhiyan Anandaraj likes this
8 votes

Hey Glenn,

You certainly can, just use:

createdDate >= "2017-11-16 14:00" and createdDate <= "2017-11-16 23:00"

That should give you the tickets created during the specific time window you are looking for.

Hope this helps,


Ohh I forgot to mention the current date must be dynamic upon creation of ticket

Like Jim Karpe likes this

Thanks Tyler! 

Found this plugin "Jira Assistant" this is awesome, you can just query on the dates of the worklog and you'll get only the work logs between that date

How to get last one week/month ticket created between 10 PM to 8 AM?

Hi @Paul.j 

I'm not the JQL expert, but the following query works for me:

project = ProjectName and created >="yyyy/MM/dd 10:00" AND created <="yyyy/MM/dd 08:00"

Hope this helps.

Best regards

Hello, not sure what you meant but writing 

created >="yyyy/MM/dd 10:00" AND created <="yyyy/MM/dd 08:00"


does not work : you have to specify year/month/day or else use startofday() etc 

yuliia_b__SaaSJet_ Marketplace Partner Aug 05, 2022

Yes, you should specify year/month/day. That was only an example.

Suggest an answer

Log in or Sign up to answer