Just try this with your number format

#NUMBERFORMAT(1234.1200,'99999.99')# Or if its always going to be a Money
amount #DOLLARFORMAT(1234.1200)#



Hope this helps.



Jason E Miller
Computer Consultants Unlimited
http://www.computercu.com
Brainbench Certified Cold Fusion Developer 4.5
Transcript Link:
http://www.brainbench.com/transcript.jsp?pid=477741

-----Original Message-----
From: Cameron [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 20, 2001 8:21 PM
To: CF-Talk
Subject: Fighting with NumberFormat

Hi all,

I dunno if anyone has had this problem before, but I have been fighting with
NumberFormat for about an hour now...

I am getting a Cost Price for a product from a database which stores the
price as "Money".

So I am trying to keep things consistant & remove the extra zeros' that are
returned (1234.1200). I'm _trying_ to use NumberFormat(cost_price, "__.__")
to format it as "0.00" etc.

But I am getting some weird results
cost_price=1234.12 => NumberFormat(cost_price, '__.__') =>1232.
cost_price=50.00 => NumberFormat(cost_price, '__.__') => 50.00

I have used combinations of everything I can think of
1234.1200 => '__.00' => 1232.
50.0000 => '__.00' => 50.00

1234.1200 => '00.9900' => 1234.12
50.0000 => '00.9900' => 50.0000

etc, etc...

Can someone PLEASE help me get this consitent... all I want is 2 decimal's
after the decimal place, and any number before it.

Cameron



Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to