| The duration should be declared as a number, not as a time, because it returned as number of seconds. Another way is to do it is to use the Timer statement which returns time in milliseconds
 Dim start, number Dim duration, number
 Time 0, start  blah blah blah  Time start, duration  Please see examples in the on-line help for more info. While in Timer or TimeDiff help topics click the Examples button.  : Hi all, : I'm storing the start time and finish time of an sql statement
 : in 2 variables in a JAL job. I want to get the difference
 : between them and test it against a threshold of 10 seconds.
 : Here's what I've got so far: Dim start_time, time
 : Dim end_time,time
 : Dim duration,time
 : Dim delay,boolean
 : now(start_time)  : blah blah blah  : now(end_time)  : TimeDiff(start_time,end_time,duration)  : Any advice would be appreciated. : Thanks
 
 
 |