decRound Function [AX 2012]

Updated: November 24, 2009

Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

Rounds a number to the specified number of decimal places.


real decRound(real figure, int decimals)

Parameter

Description

figure

The number to round.

decimals

The number of decimal places to round to.

The value of the specified number, rounded to the specified number of decimal places.

The value of the decimals parameter can be positive, zero, or negative.

  • decRound(1234.6574,2); //Returns the value 1234.66.

  • decRound(1234.6574,0); //Returns the value 1235.

  • decRound(1234.6574,-2); //Returns the value 1200.

  • decRound(12345.6789,1) //Returns the value 12345.70.

  • decRound(12345.6789,-1) //Returns the value 12350.00.


Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).

Community Additions

ADD
Show: