Solved

Getting currency (i.e. $12.57) to display correctly

Posted on 2000-02-22
4
165 Views
Last Modified: 2013-12-24
I really, really need your help.  I have been using cold fusion (learning it).  I am a web page developer and have an account that CF would work with.  I have tried and tried to get it to report my data in currency format and it just won't show up properly.  I'm really frustrated.  My manual is "Cold Fusion 4.0" by Ben Forta.
 
here is an example:
 
Toy Banks
Stock Number Description In Stock Retail Category
16022.0  660 Int. 1999 TF 1st 1/64  5.0  $15.0000  T1  

 
 
As you can see there are decimals that aren't wanted and 4 zeros after dollar amount. If you can tell me what I am doing wrong, please do so. I should also say that MS Access is my database and the cells are formatted as currency and it looks fine there.
0
Comment
Question by:soppel022200
  • 3
4 Comments
 
LVL 5

Expert Comment

by:nathans
ID: 2549034
     #NumberFormat("",'_$____.__')#

   
0
 
LVL 5

Accepted Solution

by:
nathans earned 100 total points
ID: 2549039
#NumberFormat("",'_$____.__')#

$15.00

#NumberFormat("",'$____.__')#

$   15.00

Here are two types.

If you were getting my new ColdFusion Tips Plus e-ZINE you would not have had to ask the question.

Check it out at
http://www.nsnd.com/cftips

or subscribe to the weekly e-ZINE by
emailing a blank email to
subscribe-cftips@nsnd.com



0
 
LVL 5

Expert Comment

by:nathans
ID: 2549045
#NumberFormat("#myvar#",'$____.__')#
0
 

Author Comment

by:soppel022200
ID: 2550417
I am impressed! your answer worked. I tried this earlier and it didnt work. I think I left the quotes out.  Thanks!! SteveO
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question