4 Replies Latest reply on Oct 21, 2014 7:45 AM by gkaiseril

    Calculating, Start + Stop - Break time?

    lizzagna

      Saw a previous thread that was helpful using this javascript.

       

      var cIn = "JOBSTARTTIME.0", cOut = "JOBFINISHTIME.0"; 

      event.value = TimeDiff("HH:MM", cIn, cOut,);

      // convert zero entry to null

      if(event.value == 0) event.value = "";

       

      My job sheets include a break time that is subtracted from amount of hours worked.

      How can I include this into my javascript?

      Im assuming something like

       

      var cIn = "JOBSTARTTIME.0", cOut = "JOBFINISHTIME.0", cBreak = "BREAK.0"; 

      event.value = TimeDiff("HH:MM", cIn, cOut, cBreak);

      // convert zero entry to null

      if(event.value == 0) event.value = "";

       

      However no luck. Any input would be helpful. Please keep in mind I have no experience in this matter. Just research with trials and many, many, many, fails.