[rt-users] Ticket SQL for dates?

Alex Vandiver alex at chmrr.net
Sat Dec 31 19:37:15 EST 2016

On Sat, 31 Dec 2016 12:41:21 -0500
Alex Hall <ahall at autodist.com> wrote:
> In a thread a week or two ago, I was asking about the syntax for finding
> tickets by relative dates, like "3 days ago". It wasn't working, and at
> least one other list member was able to confirm that it wasn't.

You're getting tripped up by the "ago", which in English
inverts the meaning of less-than and greater-than.  A search
for "LastUpdated > '3 days ago'" finds tickets whose LastUpdated stamp
is after the point in time 3 days ago -- that is, within the last three
days.  Here's that search on issues.bestpractical.com:


TicketSQL isn't SQL because we don't want to allow SQL injection
 - Alex

More information about the rt-users mailing list