Skip to content

CCur - Built-in Conversion Function

See Also

Conversion functions

Purpose

CCur returns an expression converted to a currency.

Syntax

CCur(exp)

Arguments

Argument Required Description
exp Yes Any valid expression

Returns

Currency

Example

Dim nTest

Let nTest = 543.214588

Return CCur(nTest) // returns $543.2146 ('$' if the currency symbol is the USA Dollar; rounded on the 4th decimal)

Notes

  • CCur rounds exp to four decimals and uses the locale settings for decimal and thousand separators.
  • When exp cannot be converted to a currency, a runtime error is generated.