Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Old 05-16-2004, 03:38 PM Decimal Places
Novice Talker

Posts: 6
Trades: 0
Hi

I'm trying to perform a percentage calculation and only need 2 decimal places. The script I'm using is:

<%= (FormatNumber(CompanyFileSize.Fields.Item("Expr100 0").Value)/(TotalFileSize.Fields.Item("Expr1000").Value)*100, 2)%>

...but it's not working.

It works fine without the (FormatNumber and , 2) sections but returns dozens of decimal places.

Any suggestions?

M

Last edited by MichaelThomas; 05-16-2004 at 03:40 PM..
MichaelThomas is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-16-2004, 04:52 PM
Novice Talker

Posts: 6
Trades: 0
Sorry - just worked it out...

<%= FormatNumber((CompanyFileSize.Fields.Item("Expr100 0").Value)/(TotalFileSize.Fields.Item("Expr1000").Value)*100, 2) %>

Oops!

M
MichaelThomas is offline
Reply With Quote
View Public Profile
 
Old 06-01-2004, 03:50 PM
Novice Talker

Posts: 14
Trades: 0
Remember, this is the format: FormatNumber(number to be formatted, 2)
jonnyfb is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Decimal Places
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.20018 seconds with 12 queries