Okay, my input:

>From the books: 

"For Date/Time fields, the current time (date defaults to current day).
Anything stored in a date/time field is stored as the number of seconds
since
UNIX epoch time, which includes the date and time.
For Time fields, the current time.
For Date fields, the number of seconds since 12:00:00 a.m., which is
converted to a date value."

So, make sure you are NOT using a Date/Time field. If you use a Date
field, then your calculation should be correct, as I think a Time field
should be working as well.

Very important from what I am reading: 

If you use a Time Field, the data is stored independent of time zone
(I'm guessing in GMT). I am wondering if this is causing the issue. Make
sure that you factor in your offset of 5 or 6 hrs, whatever central is.
This will not be fun whenever you go into daylight savings time.

I don't think a Date field is what you want to use here, as it is
designed to store numbers of days, not seconds. Date/Time fields are
DEFINITELY not what you want to  use.


Thanks,


Gary Opela, Jr

Sr. Remedy Developer

Leader Communications, Inc.

405 736 3211


-----Original Message-----
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of LJ LongWing (Head)
Sent: Tuesday, January 08, 2008 7:42 AM
To: [email protected]
Subject: Re: need help to figure out $TIME$!

** 
Sorry to pull you out of retirement for this...:)....but
 
What you are proposing as a qualification would actually give everything
that was outside of the range he is looking for
 
i am trying to test $TIME$ if it falls between 06:00-18:00 CST 
 
getting back to his original question, I don't see anything wrong with
the qual he was using of
 
($TIME$ >= (60 * 60 * 6) AND $TIME$ < (60 * 60 * 18)
 
and if he has this running this in a filter to have a filter fire only
on modify/submit/event between business hours...that qual should work


________________________________

From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of patrick zandi
Sent: Monday, January 07, 2008 8:35 PM
To: [email protected]
Subject: Re: need help to figure out $TIME$!


** But if he uses the time field, and no date, he will get all values in
that field throughout the table - I.E Forever.
Result will be the zone "18:00-06:00" BUT these do not cross each
other.. so the Query should be IMHO 
something like.. (  ( (($TIME$ >= (3600 * 18) ) and ( $TIME$ <= (3600 *
24))  ) AND (  (($TIME$ >= (3600 * 0) ) and ( $TIME$ <= (3600 * 6)) ) ) 
two zones are covered right?  I cannot test this.. but it seems right to
me.. 
I need to bring up a testbed to play.. just have not had time lately..
busy being retired and all... ;-)

Just a thought here..

Oh, you will get every day's records though.. Records for each and every
day.. just within that Time. 

have fun


On Jan 7, 2008 10:06 PM, LJ LongWing (Head) <[EMAIL PROTECTED]>
wrote:


        ** 
        Robert,
        I think you may have Date Fields and Time Fields confused a
bit...
         
        Time Field - Number of seconds since midnight
        Date Field - Date, with no regard for the time
         
        So if he is looking for time...he should used a time field.

________________________________

        From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Robert Molenda
        Sent: Monday, January 07, 2008 6:06 PM
        To: [email protected]
        Subject: Re: need help to figure out $TIME$!
        
        
        ** 
        Well, the $TIME $TIMESTAMP and $SERVERTIMESTAMP fields act
differently, based upon the field... and more over execution location...
         
        Since you are attempting a calculation, I first must _assume_
that you are doing this in a FILTER, which would result in $TIMESTAMP
and $SERVERTIMESTAMP always being equal.  However $TIME in a FILTER I
have seen some oddities with, in older versions of ARS ( 6.3x)
         
        However I digress as usual...
         
        If you are ONLY looking for "TIME" then ensure the field you are
using is a "TIME OR DATE" field not a TIME/DATE, because if you are
using a Date/Time or Integer or Char field, $TIMESTAMP /
$SERVERTIMESTAMP and $TIME will result in the full-boat (date + time) 
         
        Now for the oddities in $TIME as "per the book captain"...
Date/Time fieldtype = Full Boat (Date+Time), Time field = Current TIME,
and DATE field = Number of seconds since midnight.
         
        Please ensure you are using a DATE field in a FILTER and which
version+patch of ARS you are running upon.
        HTH
        Robert

         
        On Jan 7, 2008 6:52 AM, Grooms, Frederick W
<[EMAIL PROTECTED]> wrote:
        

                What part of the qualification is not working? i.e. What
times fail?
                
                A Quick and dirty cheat would be to negative check the
2nd test 
                
                (NOT ( ($TIME$ >= (60 * 60 * 18) ) OR ( $TIME$ < (60 *
60 * 6)) ))
                
                Fred
                


                -----Original Message-----
                From: Action Request System discussion list(ARSList)
                
                [mailto:[EMAIL PROTECTED] On Behalf Of Elinore AR
                Sent: Monday, January 07, 2008 5:05 AM
                To: [email protected] 
                
                Subject: need help to figure out $TIME$!
                
                can any of you folks help me?
                
                i am trying to test $TIME$ if it falls between
06:00-18:00 CST (server
                is in CST)
                
                this is the qualification i am using: 
                
                ( ($TIME$ >= (60 * 60 * 6)) AND ($TIME$ < (60 * 60 *
18)) )
                
                and it's not working!
                
                when i try to reverse the qual to test if $TIME$ is
between 18:00-06:00
                CST like this:
                
                ( ($TIME$ >= (60 * 60 * 18) ) OR ( $TIME$ < (60 * 60 *
6)) ) 
                
                it works just fine.
                
                what's wrong with the 1st qualification?
                
        
________________________________________________________________________
_______
                UNSUBSCRIBE or access ARSlist Archives at
www.arslist.org <http://www.arslist.org/> 
                Platinum Sponsor: www.rmsportal.com
<http://www.rmsportal.com/>  ARSlist: "Where the Answers Are"
                


        __Platinum Sponsor: www.rmsportal.com ARSlist: "Where the
Answers Are" html___ 
        __Platinum Sponsor: www.rmsportal.com ARSlist: "Where the
Answers Are" html___ 




-- 
Patrick Zandi __Platinum Sponsor: www.rmsportal.com ARSlist: "Where the
Answers Are" html___ 
__Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"
html___ 

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"

Reply via email to