Hello, I m working in an busyness application in Spanish from Argentina, and I need to work with monetary values and converting them to string. I have been reading and working with Currency and its toText method. For display on screen I need the $1.000.000,00 format and for exporting to txt and csv I need the 1000000.00 format. I got the results I need, but I m worried about the way I m doing it, because it differs from the documentation description.
This is my example code:
dim s1, s2, s3, s4 as String
dim pesos as Currency = 100000.15
dim l as xojo.Core.Locale
l = xojo.Core.Locale.Current
s1 = pesos.ToText(l)
s2 = pesos.ToText(New Xojo.Core.Locale(“es-AR”))
s3 = pesos.ToText(xojo.core.Locale.Raw)
s4 = pesos.ToText
This is what I get:
s1 = “$100.000,15”
s2 = “$100.000,15”
s3 = “¤100,000.15” -> I do not want this value
s4 = “100000.15”
According to documentation (http://developer.xojo.com/currency) when toText has no locale it uses Raw, but according to my tests it uses this very clean transformation I need. Is it a bug in documentation? can I keep using this method?
Thanks a lot