Always display two digits after decimal separator ...

Hi all,

If My value is 100 then I want to pass this value as 100.00 If 198.87 then 198.87.

I need this value pass only in decimal type.

My problem is when value has no decimals then it pass as without decimal.(ex : 100)

I have using NAV 2016 

Please suggest me answer

Thanks In advance.

  • use the FORMAT function where you can format the decimal.

  • FORMAT is one way to do it, if you are trying to format a variable i.e. on a report.

    But that's not what I would recommend to use, as it really depends on what you are trying to do.

    If the field you need always to have two digits is a field, then the easiest way is to use:

    DecimalPlaces = 2:2;

    2:2 means it always would display 2 digits, whereas 0:2 would mean max. 2 digits.

    This way you don't need to use FORMAT everywhere, and it will also display correctly in pages. Using format would render the field "Readonly".