Time Between Dates and Jira formula fields

Cloud This page documents the Forge build of Time in Status for Jira Cloud. On Jira Data Center or Server? See Time in status | SLA | Timer | Stopwatch for Data Center.

Overview

Jira has its own formula fields: a custom field whose value is calculated from other fields of the same work item. Formulas include date functions, so a formula field can also show the time between two dates. This page compares such a formula with a Time Between Dates field, so you can choose the one that fits your case.

The statements about formula fields on this page come from two Atlassian pages, as they read in December 2026:

Check these pages for the current list of functions: Atlassian can change it.


What formula fields cover

According to the Atlassian pages:

  • A formula uses data of a single work item only: it can’t take values from other work items.
  • Date functions give the difference between two dates or date-time values of the work item: DATE_DIFF and DATETIME_DIFF return seconds, DAY_DIFF returns days, HOURS_DIFF, MINUTES_DIFF and SECONDS_DIFF return hours, minutes and seconds.
  • WORKDAY_DIFF returns the number of weekdays between two dates; ADD_WORKDAY adds weekdays to a date.
  • The output of a formula is a number, text, date or duration, and you can use the field in the List view, on the board, in JQL search and in automations.
  • Atlassian also names counting the working days left until a work item’s due date, with a text such as “due soon” or “overdue”, as a use of formula fields.

If you need the number of days, weekdays or clock hours between two dates of a work item, a formula field does that.


Where a Time Between Dates field differs

Need Jira formula field Time Between Dates field
Unit of the result Days, weekdays, or clock hours, minutes and seconds Working time of a work calendar, shown in a time format of your choice
Working hours, breaks, holidays None of the listed functions takes working hours, break times, holidays or a calendar The calendar sets working hours per day, break times and custom days for holidays; a Calendar Select field can pick another calendar for an issue
Time zone of the working day Time zone is a parameter of functions that format a date or take a part of it (DATETIME_FORMAT, YEAR, DAY, HOUR and others); WORKDAY_DIFF and HOURS_DIFF take only the two dates Working time is counted in the time zone of the calendar
Period up to the current moment Atlassian names counting the working days left until a due date Current Date Time as the end gives the age of a date, as the start - a countdown to it; both in working time
Goal, time spent, time left One output per field: a number, text, date or duration Goal, time spent and time left of the same period, see Display modes
Past a deadline Atlassian names a text output such as “overdue” The countdown keeps going: time spent shows the overrun, LeftTimeSeconds turns negative
JQL search The field can be used in JQL search Properties in seconds, minutes and hours, StateValue, GoalTimeSeconds, LeftTimeSeconds and DateNextUpdate

How the field’s values are kept up to date - the next recalculation of a value with Current Date Time is planned by the app, and DateNextUpdate shows when it runs - is described in JQL search and Recalculation.


Example: working hours an issue has waited since a date

Your team works Monday to Friday, 09:00-18:00 in its own time zone, with a one-hour lunch break and public holidays. You want to see how many of those working hours an issue has waited since the date in its Waiting since field.

A formula counts weekdays (WORKDAY_DIFF) or clock hours (HOURS_DIFF) between two fields of the work item; none of the listed functions takes working hours, breaks or holidays.

With a Time Between Dates field:

  1. Create a work calendar with the working days, the break, the holidays as custom days and the time zone.
  2. Create a Time Between Dates field, for example Waiting time, and a field setting:
    • Start field - Waiting since;
    • End field - Current Date Time;
    • Default Calendar - the calendar from step 1;
    • Display mode - Time spent.
  3. Bind the setting to the field context.

The field shows the working time since the date and grows during working hours only. Search it by its searchable properties: TimeInHoursValue is the total elapsed time as decimal hours. Issues that have waited more than 16 hours:

"Waiting time.TimeInHoursValue" > 16

Example: time left until a deadline by a calendar

You want to see how much working time is left until the Due date of an issue and find issues that are past it.

With a Time Between Dates field, for example Time to due date:

  • Start field - Current Date Time;
  • End field - Due date;
  • Default Calendar - your support calendar;
  • Display mode - Left time.

This is the countdown mode. Due date has no time, so the period ends at the end of that day in the time zone of the calendar.

Issues past their due date:

"Time to due date.LeftTimeSeconds" < 0

Issues with less than 4 working hours left:

"Time to due date.LeftTimeSeconds" > 0 AND "Time to due date.LeftTimeSeconds" < 14400

Sort open issues by working time left:

statusCategory != Done ORDER BY "Time to due date.LeftTimeSeconds" ASC