ToString method

Official Content
This documentation is valid for:

Returns a String.

Syntax

&DataType.ToString()

Type Returned:
Character

Scope

Generators:  .NET Java Ruby (up to GeneXus X Evolution 3),  Visual FoxPro (up to GeneXus X Evolution 3)

Samples

&httpclient.execute("GET","/servlet/hclientes")
&html = &httpclient.ToString()

It returns the HTML code of the webpanel clients in the &html variable.

&TxtYMDHMStoT = &DateTime.ToString()

&Num_10_2=1.5 // &Num_10_2 is Numeric Type variable with length 10 and 2 decimals.
&Char20 = &Num_10_2.ToString()

The result in &Char20 is "      1.50".
The ToString method returns blanks at the left of the number,  and 0's after the decimals, depending on the definition of the variable . In this case are 10 characters and 2 decimals

See Also

FromString method

HttpClient data type
HttpRequest data type

TtoC function
DtoC function
Str function