Welcome Guest | My Membership | Login

Tech Tip - Number to Word Conversion

Article

Some of your business processes are complex, some are simple. Let's look at check writing as an example. This is a really simple process, but you can run into one small snag.

When writing checks, you likely want to spell out the dollar amount that the check is for as an additional security feature.

$1023.23 = One Thousand Twenty-Three and Twenty-Three Cents.

There is no OCONV function that will do this for you, so this simple little program will likely come in handy:

NUMBER = "127.35"
CALL NUMBER.TO.ALPHA(NUMBER,INT.WORD,DEC.WORD,"0")
CRT "NUMBER: ": NUMBER
CRT "WORD: ": INT.WORD :" AND ": DEC.WORD :" CENTS"
END

This will produce the following results:

NUMBER: 127.35
WORD: ONE HUNDRED TWENTY-SEVEN AND THIRTY-FIVE CENTS

In addition to converting numbers into dollar formats, you may need to convert it into a alpha counting formats, such as:

NUMBER: 127.35
WORD: ONE HUNDRED TWENTY-SEVENTH POINT THIRTY-FIFTH

You can download the code for this subroutine from:

http://www.intl-spectrum.com/resource/173/Numeric_To_Alpha_Conversion.aspx

 

# # #          # # #          # # #

 

Related Articles

  • Convert C#/VB.NET Date/Time to Internal Date

    This Article will show you how to convert a C# or VB.NET Date/Time object into an Internal MultiValue Date. It will show you how to do it using the ICONV functions, and well as how to generate an Internal Date without using the ICONV function.

  • Convert Internal Date into C#/VB.NET Date/Time

    This article will show how to convert a MultiValue (PICK) Internal Date into a DateTime object that you can use in C# and VB.NET. The article will cover how use the OCONV statement, as well as, how to generate the DateTime object without using the OCONV statement.

  • Numeric to Alpha Translation

    Database: D3, Advanced Pick, AREV, jBase, Mentor/PRO, mv*Base, mvEnterpise, OpenInsight, OpenQM, Reality, Ultimate, UniVerse, UniData, UniVision

    The attached subroutine will convert a numeric values to their alphabetic values. The number "4" converts to "four"; "25" converts to twenty five, etc. There is also an option that will allow you to change a numeric value into an alphabetic count. For example, 4 converts to "forth", "25" converts to twenty-fifth.


Return to top