From http://www.w3schools.com (Copyright Refsnes Data)

VBScript CStr Function


VBScript Reference Complete VBScript Reference

The CStr function converts an expression to type String.

Syntax

CStr(expression)

Parameter Description
expression Required. Any valid expression

If expression is:

  • Boolean - then the CStr function will return a string containing true or false.
  • Date - then the CStr function will return a string that contains a date in the short-date format.
  • Null - then a run-time error will occur.
  • Empty - then the CStr function will return an empty string ("").
  • Error - then the CStr function will return a string that contains the word "Error" followed by an error number.
  • Other numeric - then the CStr function will return a string that contains the number.

Example 1

Dim a
a=False
document.write(CStr(a))

Output:

False

Example 2

Dim a
a=#01/01/01#
document.write(CStr(a))

Output:

1/1/2001


VBScript Reference Complete VBScript Reference

From http://www.w3schools.com (Copyright Refsnes Data)