# Setting Decimal Places

Page 1 of 1

## 3 Replies - 19425 Views - Last Post: 23 November 2002 - 01:32 AMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=5980&amp;s=f9727fea3371fe60fd8699e7e22e81af&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 tcpvi

Reputation: 0
• Posts: 4
• Joined: 22-November 02

# Setting Decimal Places

Posted 22 November 2002 - 08:30 AM

This is probably a simple question but I can't find solution in 1600 pages of ASP books!

I taking a form result, doing some calculations and displaying the results, as:

subtotal = quan * 15.00

I want the results to appear with 2 decimal places, as currency, but trailing zeroes are being truncated.

There must be a way to do this, can you help?

Thanks, Tom
Is This A Good Question/Topic? 0

• g+ + -o drink whiskey.cpp

Reputation: 249
• Posts: 13,507
• Joined: 12-July 02

## Re: Setting Decimal Places

Posted 22 November 2002 - 10:27 AM

As currency
```subtotal = FormatCurrency(quan * 15.00)

```

Just with 2 decimal places
```subtotal = FormatNumber((quan * 15.00),2)

```

HTH!

### #6 tcpvi

Reputation: 0
• Posts: 4
• Joined: 22-November 02

## Re: Setting Decimal Places

Posted 22 November 2002 - 02:10 PM

Thanks! worked just as expected, even better because it is currency - don't need to add \$ now.

Regards,
Tom

• g+ + -o drink whiskey.cpp

Reputation: 249
• Posts: 13,507
• Joined: 12-July 02

## Re: Setting Decimal Places

Posted 23 November 2002 - 01:32 AM

tcpvi, on Nov 22 2002, 05:10 PM, said:

Thanks! worked just as expected, even better because it is currency - don't need to add \$ now.

Regards,
Tom

Always willing to help, amigo!