Home      Ask a Question      My Stuff      Help   
  
Scripting - Round Off Seconds
Sometimes seconds can adjust actual hours worked in unforeseen ways. But using the below rounding script can help in that all it does is rounds to the minute and in effect regardless of if it is 1 or 59 it will round those seconds off so that time calculation will only be based on actual minutes and hours worked:

hours = round(hours,2);

round ("D1");

To add this in TimeWorks Plus go to Settings Menu > Processing Rules and do a search for "RoundScript". Select the link and enter the script there.

To add this in TimeWorks go to Accountant Menu > Custom Processing / Rounding Rules then to the link below "ROUND RULES (ADD SCRIPT)" and add this there.


Note: This works regardless of if the "UseMinuteRounding" feature is selected or not.

You could instead of rounding just remove the seconds using the below script:

if(istimes){

if(inispresent){
indt = left (indt,17) + "00";
}

if(outispresent){
outdt = left (outdt,17) + "00";
}

}
ID
518
Category
>Support
  Rounding
Date Created
1/4/2011 2:42:09 PM
Date Updated
4/11/2022 1:17:17 PM
Back to Search Results