CStr Function

Use to convert the passed data type to a String. You can also pass a class instance as long as the class implements the Operator_Convert method that returns a String. See the Str function for more information.

Syntax
result = CStr( data )

Parameters
data | Variable | The variable or class that will be represented as a string.

Return Value
Result | String | The string representation of the value passed.

# Examples

These examples return the string representation of two numbers and a Boolean.

Dim s as String
Dim d as New Date
s=CStr(1) //returns "1", as a string
s=CStr(d.Day) //returns the day number as a string
s= CStr( True) //returns "True"

# See Also

CDbl, Str, Val functions.