I’ve dealt with similar JQL quirks before, and it can be frustrating. One trick that’s worked well for me is using the ‘startOfDay()’ function in combination with the ‘@’ symbol for relative dates. Here’s a query that might help:
project = “myproject” AND created >= startOfDay(@-2d) AND created < startOfDay(@-1d)
The ‘@’ ensures you’re anchoring to the current date, which can be crucial for consistent results, especially in automated reports or dashboards.
Also, don’t forget about time zones! If you’re working across different time zones, you might want to specify the time zone in your query:
project = “myproject” AND created >= startOfDay(“2023-03-01”, “America/New_York”) AND created < startOfDay(“2023-03-02”, “America/New_York”)
This approach has saved me countless headaches when dealing with date-specific JQL queries. Hope it helps you too!
I’ve encountered similar issues with JQL date filtering. From my experience, the most reliable way to get issues from a specific day is to use the ‘startOfDay()’ and ‘endOfDay()’ functions. Try this query:
project = “myproject” AND created >= startOfDay(-2d) AND created < startOfDay(-1d)
This should give you all issues created exactly 2 days ago. For a specific date, you can use:
project = “myproject” AND created >= startOfDay(“2023-03-01”) AND created < startOfDay(“2023-03-02”)
These functions ensure you’re capturing the full 24-hour period without any timezone issues. They’ve been a lifesaver for me in getting precise date ranges in Jira.