3 Replies - 19097 Views - Last Post: 23 November 2002 - 01:32 AM Rate Topic: -----

#1 tcpvi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • 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
  • +

#5 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • 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! :)
Was This Post Helpful? 1

#6 tcpvi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • 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
Was This Post Helpful? 0
  • +
  • -

#7 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • 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! :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1