I'm calculating total seconds using the following formula. The formula is working fine. What I'd like to do is set a maximum value of 599, that is, if the result is > 599, I want to set it to 599. Can anyone help?
//calculate incident first on scene response time
//date difference in seconds
Numbervar SecondsBetweenDate := (Date ({incident.arrivaldate}) -
Date ({incident.alarmdate})) * 86400;
//time difference in seconds
Numbervar SecondsBetweenTime := (Time ({incident.arrivaldate}) - Time (0,0,0)) -
(Time({incident.alarmdate}) - Time(0,0,0));
//add date difference and time difference
SecondsBetweenDate + SecondsBetweenTime
//calculate incident first on scene response time
//date difference in seconds
Numbervar SecondsBetweenDate := (Date ({incident.arrivaldate}) -
Date ({incident.alarmdate})) * 86400;
//time difference in seconds
Numbervar SecondsBetweenTime := (Time ({incident.arrivaldate}) - Time (0,0,0)) -
(Time({incident.alarmdate}) - Time(0,0,0));
//add date difference and time difference
SecondsBetweenDate + SecondsBetweenTime