I’m currently setting up some filters in JIRA that rely on the CreateDate. The only function I’m aware of is Now(), which gives me a time-specific result, like when I use intervals such as “-1d” or “-4d”. The issue is that this way, I can’t get issues created on an exact day because Now() involves the current time.
For example, if I type:
Created < Now() AND Created >= "-1d"
Running this at 2 PM today shows all issues created from 2 PM yesterday up to 2 PM today. On the other hand, if I run this query tomorrow at 9 AM, it will return issues created from 9 AM today to 9 AM tomorrow. What I need is a way to fetch all issues created from midnight to 11:59 PM on any given day. Is there a way to achieve that?
same problem! I found startOfDay() helps! You can do created >= startOfDay() AND created < startOfDay('+1d') for full day. For specific dates, try created >= "2024-01-15" AND created < "2024-01-16".
I’ve hit this exact problem building automated reports. JIRA treats date strings like “2024-01-15” as midnight of that day, so you can just use created >= "2024-01-15" AND created < "2024-01-16" - skip the timestamps. One thing that bit me hard: check what timezone your JIRA instance uses if you’re working with international teams. My queries were all wrong because the server ran UTC while I was thinking EST. And stick to YYYY-MM-DD format - anything else breaks or gives weird results.
The endOfDay() function pairs well with startOfDay(). I’ve been doing JQL queries for reporting and found exact date strings work better than relative functions when you need consistent results across time zones. Something like created >= "2024-01-15 00:00" AND created <= "2024-01-15 23:59" gives you precise control. Watch out for the date format though - JIRA’s picky about it. If your team spans multiple time zones, remember the server time zone affects how these queries read dates, so you might need to account for that offset.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.