$WBFORMAT - format text

Availability
$WBFORMAT  is available for use with all WBSP commands:

Syntax
$WBFORMAT{sourcetext|formatstring}
$WBFORMAT[sourcetext|formatstring]

Parameters
sourcetext - text to be formatted
formatstring - any valid named or user-defined format string.

Returns
The sourcetext formatted using formatstring

Example

<!--
[FormFields]
wb_command=r
-->
<!--WB_BeginTemplate-->
<html>
<head>
<title>WBFORMAT example</title>
</head>
<body>
Original number: 123456789<br>
Formatted number: $WBFORMAT[123456789|#,###.00]<br>
> Original date: 12/7/08<br>
Formatted date: $WBFORMAT[12/7/08|dd-mmmm-yyyy]
</body>
</html>

After running this example, the resulting page in browser, may look like this:

Original number: 123456789
Formatted number: 123,456,789.00
Original date: 12/7/08
Formatted date: 12-July-2008