VBScript CCur Function

Definition and Usage

The CCur function can convert an expression to a currency (Currency) type.

Syntax

CCur(expression)
Parameter Description
expression Required. Any valid expression.

Instance

Example 1

dim a
a=134.345
document.write(CCur(a))

Output:

134.345

Example 2

dim a
a=1411111111.345455
document.write(CCur(a))	'Please note that this function will round the result to 4 decimal places.

Output:

1411111111.3455