Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

how can I create a jql filter with time range between two dates

Edited

Hi 

 

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.

3 answers

1 accepted

11 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?

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,

Tyler

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

Like Jim Karpe likes this

Thanks Tyler! 

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 

Suggest an answer

Log in or Sign up to answer
TAGS

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