Convert Number to Currency Text

Converts number to currency text (for example, 12345.6 becomes $12,345.60)

Please note: The command will be compatible with the currency settings in your simulation preferences.

Parameters

  • Number - Number to be converted to currency
  • Text - Returned currency text



Examples

Example 1

On End Run Logic
SET ssData[1,1] = 1234.56
Convert Number to Currency Text ssData[1,1], gblText

The above example will convert 1234.56 (from the spreadsheet ssData[1,1]) to $1234.56, and store it in the variable gblText.

Example 2
On End Run Logic
Convert Currency Text to Number 1000, gblText

The above example takes the value of 1000 and will store it in the variable gblText as the string “$1000.00”

Comments

This command is only available with Simul8 Professional 2017 and later.


See Also