And keep in mind that in January, your previous month query has to account for 
the change in year as well as the change in month.

Analytics has some variables built in to the Universe for every important date 
field that make this kind of calculation really easy, but to do it manually?  
It's not going to be pretty no matter how you approach it.  I'm certainly no 
expert in how to best accomplish things using Remedy code, but from a pure 
logic standpoint, it seems like you'd have to use a substring function to pull 
out both the month and year of the date you are looking at, calculate the 
previous month and year based on those values, then query for tickets whose 
dates have month and year values that match the previous month and year values 
you calculated.


Natalie Stroud
SAIC @ Sandia National Laboratories
ARS-ITSM Reporting Specialist
Albuquerque, NM USA
nkst...@sandia.gov
ITSM 7.6.04 SP2 – Windows 2003 – SQL Server 2008

-----Original Message-----
From: Action Request System discussion list(ARSList) 
[mailto:arslist@ARSLIST.ORG] On Behalf Of Brittain, Mark
Sent: Friday, March 15, 2013 8:10 AM
To: arslist@ARSLIST.ORG
Subject: [EXTERNAL] Re: Date Query

Yes, that would give me the last 30 days, but what I am looking for is last 
month. This being March I want the incidents created in February regardless of 
what day in March I run the report.

-----Original Message-----
From: Action Request System discussion list(ARSList) 
[mailto:arslist@ARSLIST.ORG] On Behalf Of Lisa Singh
Sent: Friday, March 15, 2013 10:06 AM
To: arslist@ARSLIST.ORG
Subject: Re: Date Query

> if it can be done for last week or last month.
>

Use this as a qualifier to find tickets logged in the last 30 days - or $DATE$ 
but I always use $TIMESTAMP$ for no particular reason.

'Reported Date+' > $TIMESTAMP$ - (30*24*60*60)

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org "Where the Answers 
Are, and have been for 20 years"

This e-mail is the property of NaviSite, Inc. It is intended only for the 
person or entity to which it is addressed and may contain information that is 
privileged, confidential, or otherwise protected from disclosure. Distribution 
or copying of this e-mail, or the information contained herein, to anyone other 
than the intended recipient is prohibited.

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org "Where the Answers 
Are, and have been for 20 years"

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
"Where the Answers Are, and have been for 20 years"

Reply via email to