FWIW, this is the script I came up with:
#!/usr/bin/perl
###
# Name: daily_transactions.pl
# Version: 0.1
# Author: Mathew Snyder
# Date: February 24, 2008
# Comments: This is a script which lists
#
Hmmm...that certainly would have been helpful. But I'm looking at the perldoc
on Date.pm and I don't see SetToNow or GoBackDays
Roy El-Hames wrote:
Hi Mathew;
Not sure if you are aware of it, but in case you did not RT gives you a
very powerful Date functions in Date.pm,
from a perl script
Hi Mathew;
Not sure if you are aware of it, but in case you did not RT gives you a
very powerful Date functions in Date.pm,
from a perl script you can do the below:
use RT::Date;
my $date = new RT::Date($RT::SystemUser);
$date-SetToNow();
my $now = $date-ISO;
$date-GoBackDays(1);
my $yesterday
SetToNow is in Date.pm, 3 rd function in the 3.6.4 version :¬)
GoBack functions seems I have added them some time in the past couple of
years, (possibly of the wiki.. the code is too neat to be mine), I have
attached my Date_Vendor in case its helpful to you and anyone else
Roy
Mathew Snyder
I'm trying to get all of the tickets which, for any given day, were LastUpdated
'yesterday'. When I do a search within RT using LastUpdated = '2008-02-24'
AND ( Queue = 'CustomerCare' OR Queue = 'TechOps' ) I'm shown 8 tickets.
However, when I run the following script I get nothing.
Quoting Mathew Snyder [EMAIL PROTECTED]:
I'm trying to get all of the tickets which, for any given day, were
LastUpdated
'yesterday'. When I do a search within RT using LastUpdated = '2008-02-24'
AND ( Queue = 'CustomerCare' OR Queue = 'TechOps' ) I'm shown 8 tickets.
However, when I
Printing $yesterday yields 2008-02-24.
$tix-BuildSelectQuery gives
SELECT main.* FROM Tickets main WHERE (main.Status != 'deleted') AND ( (
main.Queue = '1' OR main.Queue = '15' ) AND ( main.LastUpdated = '2008-02-24
05:00:00' AND main.LastUpdated = '2008-02-25 05:00:00' ) ) AND (main.Type =
I've got the dates working. However, the tickets retrieved are still based on
the day starting at 05:00:00 and ending the following morning at the same time.
How can I tell it to only return tickets from between 00:00:00 and 23:59:00?
Mathew
Stephen Turner wrote:
Quoting Mathew Snyder [EMAIL
Quoting Mathew Snyder [EMAIL PROTECTED]:
I've got the dates working. However, the tickets retrieved are still
based on
the day starting at 05:00:00 and ending the following morning at the
same time.
How can I tell it to only return tickets from between 00:00:00 and 23:59:00?
Mathew
Stephen Turner wrote:
Quoting Mathew Snyder [EMAIL PROTECTED]:
I've got the dates working. However, the tickets retrieved are still
based on
the day starting at 05:00:00 and ending the following morning at the
same time.
How can I tell it to only return tickets from between 00:00:00 and
10 matches
Mail list logo