Rounding decimal values In Dynamics NAV

 As Navision is a financial system, it's obvious that most of the time we need to handle decimal values, and rounding decimals is a very important part of it. When we are converting high-value currency to low-value currency, a small decimal can make a big difference



Name

Type

AmountToRound

Decimal

RoundToNearest

Decimal

RoundToUp

Decimal

RoundToDown

Decimal



AmountToRound:=345.8689999999;

 RoundToNearest:=ROUND(AmountToRound,0.01,'=');

 RoundToUp:=ROUND(AmountToRound,0.01,'>');

 RoundToDown:=ROUND(AmountToRound,0.01,'<');

No comments:

Post a Comment