Hi
I'm looking for a way to present a decimal value from a custom table in a transformation in currency format.
Currently the transformation simply outputs:
8765678.0000
However I want it to format as:
$8,765,678
I can't believe I'm struggling so hard to make this work. Any suggestions appreciated.
Hello Jay,
Did you try this ?
string.Format("${0:#,##0.00}", Eval<double>("Number"))
Is it a text/xml transformation or the ascx. If its ascx, the suggestion above should work fine. Otherwise, look at the macro documentation and there should be something to format a currency. If not, then you can create a custom macro that returns the formatted string.
@David thanks for your help.
Hello,
using macros (e.g. in the Text/XML transformation) the code is actually the same:
{% String.FormatString("${0:#,##0.00}", 8765678.0000) |(identity)GlobalAdministrator%}
Best regards, Jan Hermann
Hello
The code that was suggested is the same that I have on my site and it works perfectly but this is for the formatting of numbers to English currency. What is the string for French so that the result is (for example) 876,567 $
Please, sign in to be able to submit a new answer.