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
Convert Decimal Result as Whole Number
Old 11-22-2004, 05:39 PM Convert Decimal Result as Whole Number
barbara's Avatar
Skilled Talker

Posts: 79
Trades: 0
here is my function on adding 5 results:

Function Add (CdblS, CdblS2, CdblS3, CdblS4, CdblS5, CdblS6)
Add = ((CdblS + CdblS2 + CdblS3 + CdblS4 + CdblS5 + CdblS6)/6)
End Function

Some results are whole number, but some are not. I want to keep all results in the ADD function whole number.

many thanks
barbara is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-22-2004, 06:42 PM
Kyrnt's Avatar
The Post-Mod Years

Posts: 2,536
Location: Western Maryland
Trades: 0
Use the ROUND function to first round your double (decimal) values to whole numbers. If you don't want to round the numbers, also take a look at the CEIL and FLOOR methods.
__________________
—Kyrnt
Kyrnt is offline
Reply With Quote
View Public Profile Visit Kyrnt's homepage!
 
Old 11-23-2004, 09:33 AM
barbara's Avatar
Skilled Talker

Posts: 79
Trades: 0
thanks
barbara is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Convert Decimal Result as Whole Number
 

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.17692 seconds with 12 queries