| **
One additional note... In addition to forcing the date to
be interpreted as a number, subtracting "01/01/1970" also adjusts for the offset
from GMT in the local time zone. It's not the same as
subtracting zero, as one might assume. For example, "01/01/1970" resolves
to 21600 seconds (GMT -6 hours) for the Central time zone in North
America. This is a necessary adjustment before calculating the modulus
values, since the epoch date integer value is offset from GMT, not the local
time zone.
--Thomas
----- Original Message -----
Newsgroups:
gmane.comp.crm.arsystem.general
Sent: Friday, August 18, 2006 13:58
Subject: Re: Number of Cases Created
After Hours
Any ticket created between 5 PM and 8 AM any day
((((
'Arrival Time' - "01/01/1970") % 86400) >= (17 * 3600)) OR (((
'Arrival Time' - "01/01/1970" ) % 86400) <= (8 * 3600)))
Add in
whatever else criteria needed
86400 = (60*60*24) or 1 day
3600 = (60*60) or 1 hour %
= the modulus operator
In order for the mod to work on dates in a
query you have to force the date to be seen as a number. Subtracting the
date of 01/01/1970 does this.
Fred
-----Original
Message----- From: Action Request System discussion
list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Kyle
Whitley Sent: Friday, August 18, 2006 1:21 PM To: [email protected] Subject: Number
of Cases Created After Hours
I am trying to figure out a query that
will allow me to see, for a specific site, all cases that were created
between 5:00 pm - 8:00 am. I know how to do this for a specific date
using the $DATE$ keyword, but how might this be done over a extended date
range?
This is query I used for a specific date:
(('Arrival
Time' >= (( "08/17/2006" - ( 60*60*24 ) + (60*60*17)))
AND
(Arrival Time' <= (( "08/17/2006" + (
60*60*24 ) - (60*60*16))))))
ARS 6.3 Helpdesk
5.5
Thanks
Kyle
-- Kyle Whitley IT System Support
Professional Office of Information and Instructional Technology (OIIT)
Board of Regents of the University System of
Georgia
__20060125_______________________This posting was submitted with HTML in it___
|