Wednesday, March 14, 2012 Tip of the Day: Rounding Down with RNDDOWN Function Product: R:BASE eXtreme 9.5 (32/64) Build..: 9.5.1.10317 or higher ... Section: Additional Functions
Did you know that you can use R:BASE to round down numbers to a specific decimal place? The RNDDOWN function returns a number rounded down to a specified number of digits. Syntax: (RNDDOWN(number,digits)) Where: number is the number to round down digits is the number of digits to round the number down to Remarks: . RNDDOWN behaves like ROUND, except that it always rounds a number down. . If digits is greater than 0 (zero), then number is rounded down to the specified number of decimal places. . If digits is 0, then number is rounded down to the nearest integer. . If digits is less than 0, then number is rounded down to the left of the decimal point. Examples: --Example 01: SET VAR v1 DOUBLE = (RNDDOWN(662.79,0)) SHOW VAR v1 662 --Example 02: SET VAR v3 DOUBLE = (RNDDOWN(54.1, -1)) SHOW VAR v3 50 --Example 03: SET VAR v5 DOUBLE = (RNDDOWN(-23.67, 1)) SHOW VAR v5 -23.6 Have fun! Very Best R:egards, Razzak. www.razzak.com www.Razzak.com www.RazzakMemon.com

