Home      Ask a Question      My Stuff      Help   
  
Scripting - Rounding Rules
To take advantage of the many different ways that the system can "round” punches, it will help to know what commands and parameters are available. Keep in mind that rounding rules can be used with scripts to make the scripting language more powerful.

I will start with an example of a simple rounding rule that will round all punches to the nearest quarter hour:

round("N15");

In the example above, "round” is the command and the parameters are enclosed in parentheses.

The number parameter (we call it an "interval” in this article) can be one of the following: 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, or 60. (Any number that 60 is divisible by). The most common would be 1, 5, and 15. A few examples of how these would round a punch time of 7:33:12am are:

round("N1”) – rounds it to 7:33am
round("N5”) – rounds it to 7:35am
round("N15”) – rounds it to 7:30am

The basic commands are:

Round – will round both the IN and OUT punches
Roundin – will only round the IN punches
Roundout – will only round the OUT punches
Roundends – will only round the "first” IN punch and "last” OUT punch for the day

The basic parameters are:

N - NEAREST
U – UP
D – DOWN
C - Company (Rounds in favor of the company, i.e. INs UP and OUTs DOWN)

You can qualify the above parameters with:
I – IN punches only
O – OUT punches only

Examples:

round ("N10"); //Rounds to the NEAREST 10 minutes interval.
roundends ("C10"); //Rounds in favor of the company by 10 minute intervals.
roundin ("U15"); //Rounds the IN punches UP (or "ahead”) to the next 15 minute interval.
roundout ("U5"); //Rounds the OUT punches UP to the next 5 minute interval.
round ("ID1"); //Rounds the IN punch DOWN (or "back”) to previous 1 minute interval.
round ("OD15"); //Rounds the OUT punch DOWN to the previous 15 minute interval.

Please see the following articles for information on some slightly more advanced rounding rules:

Scripting - Rounding Times to a Set Schedule ("Roundtoschedule")
Scripting - Rounding to a Specific Time

Please contact the Support team for additional help.
ID
80
Category
Training
  FAQ's
Date Created
11/16/2006 10:55:19 AM
Date Updated
2/22/2013 12:23:51 PM
Back to Search Results