Next Topic

Previous Topic

Book Contents

Date/Time Comparisons

You can use an IF statement to test whether a time relative to the current time is true or not. Relative time is specified as [-][d.]hh:mm:ss where d is the number of days, hh is the number of hours, mm is the number of minutes, and ss is the number of seconds . Specifying a in front causes a time in the past to be calculated. Thus -1:00:00 means one hour ago, -3.12:45:08 means three days, 12 hours, 45 minutes, and 8 seconds ago. Notice that days has a period just after it instead of a colon. Specifying d and - are optional. These times do not take into account hours coverage associated with a policy. For example, an IF statement can test to see whether a ticket's create date/time is older than 3 days. The first value is CreateDateTime, the operator is Is Less Than, and the comparison value is -3.00:00:00.