[rt-users] Relative Dates in Search
Cassandra Phillips-Sears
cassandra at bestpractical.com
Thu Feb 26 11:45:56 EST 2009
Hi Stephen. I think I've got it.
You can use + and - signs in front to increment the numbers of weeks,
months, etc.
So, if you want to see all tickets due in the past 2 weeks before
today, you'd add this to your search:
( Due < 'today' AND Due > '-2 week' )
If you wanted to see all the tickets due today and coming up for the
next 2 weeks, you could try:
( Due = 'today' AND Due > '+2 week' )
And so on and so forth.
--
Cassandra Phillips-Sears
cassandra at bestpractical.com
Office Manager
Best Practical Solutions, LLC
http://www.bestpractical.com
On Feb 26, 2009, at 11:36 AM 2/26/09, Cassandra Phillips-Sears wrote:
> Hi Stephen. I use some dashboard searches that work like this. I
> usually calculate my searches from the ticket's due date, but you
> could use the "started" date or "created" or any other date you
> wanted.
>
> To see things that are due today and were due any time in the past,
> I use the following string in my search after setting other criteria:
>
> AND ( Due = 'today' OR Due < 'today')
>
> I also have another search that shows me things that aren't due yet:
>
> AND Due > 'today'
>
> If you are looking for more relative dates, I played around with
> this format for a few minutes and it seemed to work:
>
> AND ( Due < 'today' AND Due > 'last week' )
>
> Let me know if it works for you.
>
> It looks like you can get it down to 1 week in either direction, but
> I don't know how it would be adapted to show something like "two
> weeks ago" or "the week before last week," though. I tried putting
> those phrases in the strings and the query didn't return what I
> wanted.
> --
> Cassandra Phillips-Sears
>
> Office Manager
> Best Practical Solutions, LLC
> http://www.bestpractical.com
>
> On Feb 26, 2009, at 11:17 AM 2/26/09, Stephen Cochran wrote:
>
>>
>> Is there a way to specific a relative date in a search so that when
>> saved it will calculate off the current date? For example tickets
>> from the past two weeks but without having to adjust the date in
>> the search?
>>
>>
>> _______________________________________________
>> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>>
>> Community help: http://wiki.bestpractical.com
>> Commercial support: sales at bestpractical.com
>>
>>
>> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
>> Buy a copy at http://rtbook.bestpractical.com
>
More information about the rt-users
mailing list