I wanted to be able to output a decimal value from an object in my NVelocity template.
For example, the value of the decimal was: 3.40000 to represent 3.4.
The end result:
Total Order Value: 3.40 GBP
I needed to display this as currency format. Sure, I could of used this String.Format method, but that adds £ or $ or whatever (depending on your environment setup) to the start of the resulting string.
In the end, I used ToString with “N2” formatter.
So, in my nVelocity template, here is what I would use:
Total Order Value: $Order.GrandTotal.ToString("N2") GBP
There are some other alternatives discussed here:
http://stackoverflow.com/questions/1048643/format-a-double-value-like-currency-but-without-the-currency-sign-c

Abbie: Absolutely brilliant. Thank you....
Fernando: Thanks to publish this, works for me. :)...
Shawn: I did what you said to try but I'm still having the same issue. Do yo...
Stewart: Thanks! This really helped. The developer didn't even know that Chil...
Webdesign Aachen: is it possible to publish posts with excerpts?...