How to calculate the business days and hours in a datetime type Array field.

Hi There,

We are using RAD application "" to calculate time duration in formatctrl.

There is two datetime type array field 

Outage.start[] and Outage.end[] 

and now we want to capture the business time duration in another datetime type array field name as downtime[]

Looking for the response. Thanks in advance


  • Hi,

    we used a different RAD-Call from JS for calculating the duration:


       var rteReturnValue = new SCDatum();
       var Names = new SCDatum();
       var Vals = new SCDatum();
       var rec = new SCFile("ticketstats");
       Names.setType(8);//type array
       Vals.setType(8);//type array
       Vals.push("ticket.duration"); //any Date/Time field name, but not an array field
       Vals.push(start); // start value from a Date/Time field
       Vals.push(end); // end value from a Date/Time field
       Vals.push("24x7"); // name of caldutyhours
       var rc = system.functions.rtecall("callrad", rteReturnValue, "calendar.calc.interval.fc", Names, Vals, false);

    The result of the calculation is in the target field (here: ticket.duration). Unfortunately all the fields we used are not array fields...but maybe it's a good starting point...