Going Stellar

Home/JQL reference

JQL function

startOfDay() in JQL: syntax and examples

startOfDay() stands for 00:00 of the current day. Compare a date field with it to find work created, updated or due since midnight. Add an offset such as "-1" or "+7d" to move the boundary by days, weeks or hours.

Syntax

startOfDay()
startOfDay("inc")

Arguments

ArgumentWhat it doesOptional
incOffset in the form (+/-)nn(y|M|w|d|h|m). With no unit it counts days, so "-1" is the same as "-1d". With no sign, plus is assumed.yes

Works with

  • Fields: Created, Due, Resolved, Updated, custom Date or Date/Time fields
  • Operators: =, !=, >, >=, <, <=, and inside WAS, WAS IN, WAS NOT, WAS NOT IN, CHANGED predicates
  • Not with: ~, !~, IS, IS NOT, IN, NOT IN

Examples

created >= startOfDay("-1") AND created < startOfDay()

Everything created yesterday, from 00:00 to 23:59. The pair of bounds is what makes it one calendar day.

Run on Jira Cloud on .

created >= startOfDay("-7d") AND created < startOfDay()

The last seven full days, without today's half-finished one. Useful for a weekly intake count that does not change during the day.

Run on Jira Cloud on .

resolved >= startOfDay("-1") AND resolved < startOfDay()

What the team closed yesterday, for a daily stand-up list.

Run on Jira Cloud on .

updated < startOfDay("-14") AND statusCategory != Done ORDER BY updated ASC

Open work nobody has touched for two weeks, oldest first.

Run on Jira Cloud on .

status CHANGED TO Done AFTER startOfDay()

Work moved to Done since midnight. The function works inside a CHANGED predicate, not only after a comparison sign.

Run on Jira Cloud on .

Pitfalls

  • Dates are compared in the time zone configured for the person searching, so midnight in Bucharest is not midnight in New York. The same saved filter can return different work items for two colleagues.
  • created > startOfDay("-1") means since yesterday's midnight, so it includes today as well. For yesterday alone you need both bounds, as in the first example.
  • The offset unit is case sensitive: "-1M" is a month, "-1m" is a minute.
  • It returns a point in time, not a list. assignee in startOfDay() fails with "Operator 'in' does not support the non-list value 'startOfDay()' for field 'assignee'".

Ready-made queries

Questions and answers

How do I find Jira work items created today?

Use created >= startOfDay(). It matches everything created since 00:00 in your own time zone.

How do I search for yesterday in JQL?

Use two bounds: created >= startOfDay("-1") AND created < startOfDay(). The same pattern works for updated and resolved.

Sources

  1. JQL functions (Atlassian Support, Jira Cloud)
  2. JQL fields (Atlassian Support, Jira Cloud)

Markdown version · All JQL pages