Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns a number truncated to the specified number of digits.
Syntax
TRUNC(number, numberofdigits )
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
number |
Required |
Numeric |
The number to truncate. |
numberofdigits |
Required |
Numeric |
The number of digits to which to truncate number. |
Return value
Numeric.
Remarks
If numberofdigits is greater than 0, number is truncated to numberofdigits to the right of the decimal. If numberofdigits is 0, number is truncated to an integer. If numberofdigits is less than 0, number is truncated to numberofdigits to the left of the decimal.
Example 1
TRUNC(123.654,2)
Returns 123.65.
Example 2
TRUNC(123.654,0)
Returns 123.
Example 3
TRUNC(123.654,-1)
Returns 120.