Decimal to Word

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Aamir Mahmood

    Decimal to Word

    Hi,

    Does anybody know about any library that can convert a decimal into words.

    For example:

    decimal d = 34251.78;
    string s = DecimalToWord(d ) ;

    's' should look like "Thirty Four Thousand Two Hundred Fifty One And 78/100"

    I need this to for my module that prints checks.

    I can write it by myself, but I don't want to re-invent the wheel.

    Thanks.

    AM


  • Abubakar

    #2
    Re: Decimal to Word

    Hi,
    check this link: http://www.freevbcode.com/ShowCode.Asp?ID=616
    It doesnt handle decimals so you'll have to modify the code a bit. Also this
    code is written in old vb6. I dont think you'll have any problem running it
    in vb.net. In case you need a C# version of this code, either you can port
    it, or I would recommend making a simple dll through vb.net and using it in
    C#.

    Regards,
    ...ab
    Blogger ist ein Veröffentlichungs-Tool von Google, mit dem du ganz einfach deine Gedanken der Welt mitteilen kannst. Mit Blogger kannst du problemlos Texte, Fotos und Videos in deinem persönlichen Blog oder deinem Team-Blog veröffentlichen.


    "Aamir Mahmood" <aamirmahmood@g mail.comwrote in message
    news:u15P0KlzIH A.1236@TK2MSFTN GP02.phx.gbl...
    Hi,
    >
    Does anybody know about any library that can convert a decimal into words.
    >
    For example:
    >
    decimal d = 34251.78;
    string s = DecimalToWord(d ) ;
    >
    's' should look like "Thirty Four Thousand Two Hundred Fifty One And
    78/100"
    >
    I need this to for my module that prints checks.
    >
    I can write it by myself, but I don't want to re-invent the wheel.
    >
    Thanks.
    >
    AM
    >

    Comment

    • =?Utf-8?B?TWl0Y2g=?=

      #3
      RE: Decimal to Word

      Hi

      You might also check out this pseudocode description, which should be easy
      to turn into C# code:
      dummies transforms the hard-to-understand into easy-to-use to enable learners at every level to fuel their pursuit of professional and personal advancement.


      "Aamir Mahmood" wrote:
      Hi,
      >
      Does anybody know about any library that can convert a decimal into words.
      >
      For example:
      >
      decimal d = 34251.78;
      string s = DecimalToWord(d ) ;
      >
      's' should look like "Thirty Four Thousand Two Hundred Fifty One And 78/100"
      >
      I need this to for my module that prints checks.
      >
      I can write it by myself, but I don't want to re-invent the wheel.
      >
      Thanks.
      >
      AM
      >
      >
      >

      Comment

      Working...