Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I calculate between two dates(resolved date and create date) in JQL ?

Orkun Ovayurt
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 12, 2025

How can I calculate between two dates(resolved date and create date) ?

How many days and hours between these days ? Can you help me ?

4 answers

3 votes
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 13, 2025

Hi @Orkun Ovayurt 

Welcome to the community.

You can use smart values for this.

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/ 

You can store this in a custom field ot type text

{{[date1].diff([date2]).prettyPrint}}

3 votes
YY Brother
Community Champion
September 12, 2025

Hi @Orkun Ovayurt 

Welcome to our community.

Solution A:

1.Create a custom field called Lead Time

2.Create an automation rule to calculate the lead time when jira work items are resolved

now() - issue.created = lead time

In the Edit Issue action, set the lead time to above calc value

 

Solution B:

Some apps maybe.

Hope it helps,

Thanks,

YY Brother

0 votes
Valeriia_Havrylenko_SaaSJet
Atlassian Partner
September 21, 2025

 Hi @Orkun Ovayurt  👋

Welcome to the Community!

Unfortunately, native Jira JQL doesn’t support direct calculations between two date fields like created and resolved. JQL is great for filtering issues based on values, but it doesn’t perform arithmetic operations (like subtracting dates) out of the box.

But here are a few ways to achieve what you need:

Option 1: Use a Reporting App (like Time Metrics Tracker | Time Between Statuses)

If you need to calculate how much time passed between Created and Resolved for multiple issues (in days, hours, or even minutes), apps like Time Metrics Tracker can help. (The app developed by me team.)

You can:

  • Set Created → Resolved as a custom metric

  • See the exact duration per issue

Here’s an example from the app dashboard:

 Знімок екрана 2025-09-21 о 18.19.52.png

🔍 Option 2: Use JQL filters with relative dates

If you're only looking to filter issues where the time between created and resolved exceeds a threshold (e.g., "more than 5 days"), that’s not doable directly in JQL — but some advanced plugins like ScriptRunner or JQL Search Extensions allow for such queries.

Example (with ScriptRunner):

 

issueFunction in dateCompare("", "created", "<", "resolved -5d")

Let me know how you want to use the data, dashboard, export, automation, etc and I’ll be happy to suggest the best solution!

0 votes
Birkan Yildiz _OBSS_
Atlassian Partner
September 15, 2025

Selamlar @Orkun Ovayurt Bey,

If you are open to using a marketplace app, Timepiece - Time in Status for Jira is what you are asking for.
Its Duration Between Statuses report is designed to do exactly what you need. You can simply select the first status (e.g., To Do) as your start point and last status (e.g., Resolved) as your end point, and the report will calculate the total duration for each issue.

Screenshot 2025-09-15 110136.png

This gives you your "Resolution Time" or "Lead Time" without needing any complex workarounds. Also, you can see the total time in minutes, hours, days, weeks, etc.

resolutiontime.jpg
You can check Timepiece - Time in Status for Jira on the Atlassian Marketplace. Hope this helps you get the data you're looking for! Please feel free to reach out if you have further questions.

Disclosure: I'm on the team that makes Timepiece - Time in Status for Jira.

Suggest an answer

Log in or Sign up to answer