SOLVED

Re: Formatting Currency

Go to solution
Rob_Stretch1
Level 1

Formatting Currency

I have a currency type field that I would like to format. Right now, an example of the output would be 10000. I just want to add the commas to make the output 10,000.

$10,000 would work as well, or I could just add the dollar sign later.

Does anyone know how to do this using a script token?

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: Formatting Currency

Hi Rob,

Try,

$number.currency($myNumber)

or try

#set($String = "abc")
$String
.format("%.2f", $val
)

Or NumberTool might be useful too

$numberTool.format("#0.00", $val)

Hope this helps

Rajesh

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Re: Formatting Currency

Hi Rob,

Try,

$number.currency($myNumber)

or try

#set($String = "abc")
$String
.format("%.2f", $val
)

Or NumberTool might be useful too

$numberTool.format("#0.00", $val)

Hope this helps

Rajesh