Currency.ToText
From Xojo Documentation
Method
Converts a currency value to a Text value using the specified locale.
Notes
To display the currency symbol, you need to pass in a locale. The currency symbol is displayed before or after the number as specified by the locale settings.
If no locale is specified, then Locale.Raw is used.
Sample Code
Convert Currency to Text:
In order to display the currency symbol you need to provide a locale:
Var c As Currency = 123.45
Var t As Text
Var locale As New Xojo.Core.Locale("en-US")
t = c.ToText(locale) ' t = $123.45
Var t As Text
Var locale As New Xojo.Core.Locale("en-US")
t = c.ToText(locale) ' t = $123.45
This code displays a value using French Canadian locale with the currency symbol after the number:
Var c As Currency = 123.45
Var t As Text
Var locale As New Xojo.Core.Locale("fr-CA")
t = c.ToText(locale) ' t = 123,45 $
Var t As Text
Var locale As New Xojo.Core.Locale("fr-CA")
t = c.ToText(locale) ' t = 123,45 $