vbscript – CCur

FUNCTION: CCur( )


Implemented in version 1.0

You can determine the expression subtype by using the function VarType( ).

CCur(Number)

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

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

Code:
<% anynumber=(12345) %>
<% =CCur(any_number) %>

Output:
12345

Code:
<% any_numeric_string=(« 98765″) %>
<% =CCur(any_numeric_string) %>

Output:
98765

This function rounds off to 4 decimal places.

Code:
<% anynumber=(55555.123456) %>
<% =CCur(anynumber) %>

Output:
55555.1235

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Vous pouvez utiliser ces balises et attributs HTML : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>