FormatCurrency - Built-in Formatting Function¶
Purpose¶
Formats a currency value using the Windows locale settings or supplied mask.
Syntax¶
FormatCurrency(cur,type[,mask])
Arguments¶
| Argument | Required | Description |
|---|---|---|
cur |
Yes | The currency to be formatted |
type |
Yes | The format type from one of the predefined currency formats |
mask |
No | A string with the currency mask to use |
Example¶
// format the currency using a supplied mask
Return FormatCurrency({Order.Orderamount},drCustomCurrencyMask,"0.00;$1.1;$1.1-;.;,;$")
Notes¶
- When
curcannot be converted to a currency, a runtime error is generated. - When
typecannot be converted to an integer, a runtime error is generated. - When
maskcannot be converted to a string, a runtime error is generated.