[Zope] Number Formatting with a Comma

Roché Compaan roche at upfrontsystems.co.za
Fri Jul 9 01:34:07 EDT 2004


hpinson at indepthl.com wrote:
 > Hi.  How would I format a floating point number so that a comma
 > appears between thousands in the HTML output?
 >
 > Currently I am using C formatting in DTML:
 >
 > fmt="%.2f"  which outputs: 1999.00
 >
 > What we would like is 1,999.00

<dtml-var number thousands_commas>

See DocumentTemplate.DT_Var.py for a number of utility functions usable
inside DTML.

-- 
Roché Compaan
Upfront Systems                 http://www.upfrontsystems.co.za


More information about the Zope mailing list