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: arslist@ARSLIST.ORG 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 _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at http://www.wwrug.org