欢迎光临
我们一直在努力

FormatCurrency()

建站超值云服务器,限时71元/月

formatcurrency function
returns an expression formatted as a currency value using the currency symbol defined in the system control panel.

formatcurrency(expression[,numdigitsafterdecimal ][,includeleadingdigit ][,useparensfornegativenumbers ][,groupdigits]]]])

arguments
expression

required. expression to be formatted.

numdigitsafterdecimal

optional. numeric value indicating how many places to the right of the decimal are displayed. default value is -1, which indicates that the computers regional settings are used.

includeleadingdigit

optional. tristate constant that indicates whether or not a leading zero is displayed for fractional values. see settings section for values.

useparensfornegativenumbers

optional. tristate constant that indicates whether or not to place negative values within parentheses. see settings section for values.

groupdigits

optional. tristate constant that indicates whether or not numbers are grouped using the group delimiter specified in the computers regional settings. see settings section for values.

settings
the includeleadingdigit, useparensfornegativenumbers, and groupdigits arguments have the following settings:

constant value description
tristatetrue -1 true
tristatefalse 0 false
tristateusedefault -2 use the setting from the computers regional settings.

remarks
when one or more optional arguments are omitted, values for omitted arguments are provided by the computers regional settings. the position of the currency symbol relative to the currency value is determined by the systems regional settings.

note   all settings information comes from the regional settings currency tab, except leading zero, which comes from the number tab.

the following example uses the formatcurrency function to format the expression as a currency and assign it to mycurrency:

dim mycurrency
mycurrency = formatcurrency(1000)    mycurrency contains $1000.00.
requirements

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » FormatCurrency()
分享到: 更多 (0)