Formatting numbers in Velocity Templates?

Ads
 

Formatting numbers in Velocity Templates?

I need to display amount in following formats:

1099 -> 1,099.00

100 -> 100.00

100.251 -> 100.25

10999 -> 10,999.00

1110999 -> 11,10,999.00

Right now I am using following code to display amount:

$numberTool.format("#0.00", $credit);

In this case, if amount is 1099, then it displays 1099.00 but I want to display this amount in this format:- 1,099.00

View Answers

Ads









Related Tutorials/Questions & Answers:
Formatting numbers in Velocity Templates?
Formatting numbers in Velocity Templates?
Advertisements
formatting program
Version of velocity>velocity dependency
Formatting text in HTML
Version of velocity>velocity-dep dependency
< problem in XSL formatting
ModuleNotFoundError: No module named 'flake8-printf-formatting'
ModuleNotFoundError: No module named 'gspread-formatting'
Velocity
XML and Velocity
Artifacts of velocity
Version of plexus-velocity>plexus-velocity dependency
Version of velocity-dvsl>velocity-dvsl dependency
Version of velocity-tools>velocity-tools dependency
Version of velocity-tools>velocity-tools-view dependency
Version of velocity-tools>velocity-tools-generic dependency
sorting numbers
Prime Numbers
ModuleNotFoundError: No module named 'bottle-api-json-formatting'
Numbers pyramid
Rational Numbers
ModuleNotFoundError: No module named 'velocity'
Listing all even numbers between two numbers
how to add to numbers in java
Version of maven>velocity dependency
Maven Dependency velocity >> 1.3.1
Maven Dependency velocity >> 1.3
Maven Dependency velocity >> 1.4-rc1
Maven Dependency velocity >> 1.5
Maven Dependency velocity >> 1.4

Ads