AX – D365FO – Convert real number to string (num2str)

static void Job7(Args _args) // X++ Job in the AOT, interpreted p-code.
{
    str  moneyString;
    real moneyReal = 12345.68;

    moneyString = num2str
        (
        moneyReal,
        -1, // Minimum number of characters to output into the string. -1 means infinite number of characters

        -1, // Required number of digits to the right of the decimal. -1 means infinite number of digitis

        DecimalSeparator::Dot,    // 1
        ThousandSeparator::Comma  // 2
        );
    info(moneyString);
}

One response to “AX – D365FO – Convert real number to string (num2str)”

  1. – Hello World

    […] Num2Str […]

    Like

Leave a comment