TABLE 2: VBScript Conversion Functions
Function VarType Description
Asc - Accepts a string, and returns the ASCII decimal representation of the first character of that string. For example, the MsgBox Asc("Hello") expression returns the ASCII decimal representation of 72.
CBool 11 Interprets the specified expression, and returns a Variant whose subtype is Boolean.
CByte 17 Evaluates the expression, and if successful, returns a Variant whose subtype is Byte.
CCur 6 Evaluates the expression, and if successful, returns a Variant whose subtype is Currency.
CDate 7 Converts the expression (string or number) to a date.
CDbl 5 Evaluates the expression, and if successful, returns a Variant whose subtype is Double.
Chr - Accepts a number, and returns the corresponding ASCII character.
CInt 2 Returns a Variant whose subtype is Integer.
CLng 3 Evaluates the expression, and if successful, returns a Variant whose subtype is Long.
CSng 4 Evaluates the expression, and if successful, returns a Variant whose subtype is Single.
CStr 8 Evaluates the expression, and if successful, returns a Variant whose subtype is String.
Hex - Accepts a number, and returns its hexadecimal representation.