Data conversion and formatting functions

Some data type conversions are handled in the normal process flow by NAV without any particular attention on part of the Developer (for example, Code to Text, Char to Text). Some data type conversions can only be handled through C/AL functions. Formatting is included because it can also include a data type conversion. Rounding does not do a data type conversion, but does result in a change in format (the number of decimal places).

  • ROUND function
  • FORMAT function
  • EVALUATE function


The ROUND function allows us to control the rounding precision for a decimal expression. The syntax for the ROUND function is as follows:

DecimalResult := ROUND (Number [, Precision] [, Direction] )

Here, Number is what is being ...

Get Microsoft Dynamics NAV now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.