round

Gets the rounded value of the operand.

Available in:

Apps (win) Apps (char) Reportwriter RPC Standalone PL
X X X X X

Syntax

expr round(data,[position])
expr       data,position

Description

Returns the rounded value of data.
data specifies the value to round.

position (optional) specifies the rounding position, positive indicates positions to the right of the decimal point, negative, the left of the decimal point. The default value of position is 0.

If data is a datetime value, and position is specified, its possible values are:

MnemonicDescription
SCC,CCCentury
SYYY,YYYY,YEAR,SYEAR,YYY,YY,Y Year
Q Quarter
MONTH,MON,MM Month
W Same day of the week as the first day of the month
WW Same day of the week as the first day of the year
DDD,DD,J (Default) Day
DAY,DY,D Nearest Sunday
HH,HH12,HH24 Hour
MI Minute

Example

Displays salaries to the nearest thousand.
while(list_pos(ll) != list_next(ll))
  list_modcol(ll,6,round(list_curr(ll,6),3));
list_view(ll,0);