Name
FormatCurrency, FormatNumber,FormatPercent Functions — Microsoft.VisualBasic.Strings
Synopsis
FormatCurrency(expression
[,NumDigitsAfterDecimal
][, _IncludeLeadingDigit
[,UseParensForNegativeNumbers
[, _GroupDigits
]]]]) FormatNumber(expression
[,NumDigitsAfterDecimal
][, _IncludeLeadingDigit
[,UseParensForNegativeNumbers
[, _GroupDigits
]]]]) FormatNumber(expression
[,NumDigitsAfterDecimal
][, _IncludeLeadingDigit
[,UseParensForNegativeNumbers
[, _GroupDigits
]]]]) FormatPercent(expression
[,NumDigitsAfterDecimal
][, _IncludeLeadingDigit
[,UseParensForNegativeNumbers
[, _GroupDigits
]]]])
expression
required; ObjectThe number or numeric expression to be formatted.
NumDigitsAfterDecimal
optional; LongThe number of digits the formatted string should contain after the decimal point.
IncludeLeadingDigit
optional;TriState
constantIndicates whether the formatted string is to have a 0 before floating point numbers between 1 and -1.
UseParensForNegativeNumbers
optional;TriState
constantSpecifies whether parentheses should be placed around negative numbers.
GroupDigits
optional;TriState
constantDetermines whether digits in the returned string should be grouped using the delimiter specified in the computer’s regional settings. For example, on English language systems, the value 1000000 is returned as 1,000,000 if
GroupDigits
isTrue
.
Return Value
String
Description
Functions used to format currency, numbers, and percentages. The three functions are almost identical. They all take identical ...
Get VB.NET Language Pocket Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.