PbGlobal.String(object data, string format) Method
.NET Standard 2.x
Formats data, such as DataTime or TimeSpan values, according to a format mask. You can convert and format DateTime, numeric, and TimeSpan data. You can also apply a display format to a string.
Namespace: PowerScript.Bridge
Assembly: PowerScript.Bridge.dll
Syntax
public static string String(object data, string format);
Parameters
data
System.Object
The data you want returned as a string with the specified formatting. Data can have a DateTime, numeric, TimeSpan, or string datatype. Data can also be an Any variable containing one of these datatypes.
format
System.String
A string whose value is the display masks you want to use to format the data. The mask consists of formatting information specific to the datatype of data. If data is type string, format is required. The format can consist of more than one mask, depending on the datatype of data. Each mask is separated by a semicolon.
Returns
System.String
Returns data in the specified format if it succeeds and the empty string ("") if the datatype of data does not match the type of display mask specified, format is not a valid mask, or data is an incompatible datatype.
Examples
Coming soon.
Applies to
.NET Standard
2.x