web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Convert Amount(Money) to string

(0) ShareShare
ReportReport
Posted on by 160

How do I convert Amount/Money type into string. I am trying to convert Invoice.Amount to string.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at
    Re: Convert Amount(Money) to string

    Use the num2str function.

     

    static void Job38(Args _args)
    {
        Real r;
        Str myString;
        ;
       
        r = 25.25;
       
        myString = num2str(r, 2, 2,1,1);
        print myString;
        pause;

    }

     

    http://msdn.microsoft.com/en-us/library/aa866120.aspx

  • Suggested answer
    Hossein.K Profile Picture
    6,648 on at
    RE: Convert Amount(Money) to string

    Hi Guys,

    to do this dynamically, here is a solution:

    System.Double netDouble;

    anytype r1 = 1.125;

    str s1;

    netDouble = Global::real2double(r1);

    s1 = netDouble.ToString();

    info(strFmt("%1",s1));

  • Suggested answer
    Hossein.K Profile Picture
    6,648 on at
    RE: Convert Amount(Money) to string

    Hi ,

    Try 2 below useful link. In the two link, there are a sample function to does this.

    dynamicsuser.net/.../how-to-convert-real-numbers-into-text

    brotetechnologies.com/.../

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Tocauer Profile Picture

Martin Tocauer 4

#2
Community Member Profile Picture

Community Member 2

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans