VBScript » Functions » CCur

Version: 1.0

Syntax:
CCur(Number)

The CCur function converts any number or numeric string to the variant of subtype Currency.

Converts to currency values ranging from
-922,337,203,685,477.5808 to 922,337,203,685,477.5807

Examples

Code:
<% anynumber=(12345) %>
<% =CCur(any_number) %>
Output:
12345
Language(s): VBScript
Code:
<% any_numeric_string=("98765") %>
<% =CCur(any_numeric_string) %>
Output:
98765
Language(s): VBScript
Code:
<% anynumber=(55555.123456) %>
<% =CCur(anynumber) %>
Output:
55555.1235
Explanation:

This function rounds off to 4 decimal places.

Language(s): VBScript

See Also: