Timeline for Example of using String.format() with a number / does this function even work?
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 13, 2017 at 12:54 | history | edited | CommunityBot |
replaced http://salesforce.stackexchange.com/ with https://salesforce.stackexchange.com/
|
|
Apr 8, 2016 at 10:15 | comment | added | eyescream | @cyorkston not that I'm aware of. You'll have to roll out your own formatter, for example round down the number to cut into main & fractional part, then merge back with separators you need. Some dividing by 1000 until & adding comma till there's nothing to divide? Maybe you'll find some formatting functions or ideas at code.google.com/archive/p/apex-lang although the project is abandoned since 2012 and many functions it "patches" are now in core String library. | |
Apr 6, 2016 at 16:03 | comment | added | cyorkston | [Decimal].format() formats the Decimal value into the locale of the current user. Is there a way of formatting a Decimal to an arbitrary locale (or format) in Apex? e.g. Decimal decimalValue = 10000.00; String stringValue = decimalValue.format('###,###,##0.00'); | |
Jun 4, 2014 at 18:04 | vote | accept | Ralph Callaway | ||
Jun 4, 2014 at 8:30 | history | answered | eyescream | CC BY-SA 3.0 |