ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / String functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
NumberInWords (Function)
In french: NombreEnLettres
Converts a number to words.
The result of the conversion is:
  • expressed in French if the runtime language of the application is French. If the language of the operating system is Belgium, the "septante", "quatre-vingts" and "nonante" notations will be used.
  • expressed in English in all the other cases.
Example
Info(NumberInWords(83.335))
// Displays "eighty three point thirty four"
Info(NumberInWords(1.10, "Euro(s)"))
// Displays "one Euro ten"
Info(NumberInWords(1.01, "dollar(s)", "cent(s)"))
// Displays "one dollar and one cent"
Syntax
<Result> = NumberInWords(<Number to convert> [, <Unit> [, <Name of hundredths>]])
<Result>: Character string
Spelled-out number.
<Number to convert>: Currency
Number to convert to a character string. The number to convert to words has the following characteristics:
  • 23 significant digits: 17 digits maximum for the integer part, 6 digits maximum for the decimal part.
  • can lie within the monetary definition interval: between -604 462 909 807 314 587,353 087 and +604 462 909 807 314 587,353 087.
<Unit>: Optional character string
Unit to be used in the result: dollars, euros, ... You can add an "s" in brackets (e.g. "(s)") if the name of the currency takes an "s" in the plural..
If this parameter is not specified, the string used will be:
  • "comma" in French: for example, "dix virgule vingt-cinq"..
  • "point" in English: for example, "ten point twenty-five"..
<Name of hundredths>: Optional character string
Name of the hundredths that will be used in the result. You can add an "s" in brackets (e.g., "(s)") if the hundredths can be pluralized.
Remarks
  • The decimal part is rounded to 2 digits.
  • In English, the large numbers use the American rules:
    Number
    (Power of 10)
    Unit used in FrenchUnit used in English (American)
    10 power 6millionmillion
    10 power 9milliardbillion
    10 power 12billionquintillion
    10 power 15billiardquadrillion
Related Examples:
The NumberInWords function Unit examples (WINDEV): The NumberInWords function
[ + ] Using the WLanguage NumberInWords function.
This function is used to convert a numeric into words, which is very useful to automatically fill a check for example.
Business / UI classification: Neutral code
Component: wd300std.dll
Minimum version required
  • Version 18
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/30/2024

Send a report | Local help