434,880 Members | 2,279 Online
Need help? Post your question and get tips & solutions from a community of 434,880 IT Pros & Developers. It's quick & easy.

# getting a whole number

 P: n/a Hi Guys, Can you help me with this? Is there any function that I can use in getting a whole number Example: Input OutPut 12.3 12 1.63 1 21.1 21 Im using the function left(p1,p2) but it doesnt recognize the whole number Please help thanks =) Aug 8 '06 #1
6 Replies

 P: n/a le0 wrote: Can you help me with this? Is there any function that I can use in getting a whole number Look up the help topics for Round, CInt and FormatNumber and decide which is best for you to use -- it depends on what you're trying to achieve. Aug 8 '06 #2

 P: n/a "Bobbo" le0 wrote: Can you help me with this? Is there any function that I can use in getting a whole number Look up the help topics for Round, CInt and FormatNumber and decide which is best for you to use -- it depends on what you're trying to achieve. None of the above. ;) Int is the function needed Eg. Int(1.62) = 1 Aug 8 '06 #3

 P: n/a Anthony Jones wrote: > None of the above. ;) Int is the function needed Thanks Anthony, I stand corrected! I -- incorrectly -- remembered that CInt behaved like that. Guess it's been too long since I've done classic ASP! :-) Aug 8 '06 #4

 P: n/a Anthony Jones wrote: Int is the function needed Eg. Int(1.62) = 1 Depending on the desired behavior for negative numbers, yes. Otherwise Fix() is the one. And since this is an ASP forum, not a VBScript one, it is worth noting that Math.floor() does the same as Int(). -- Dave Anderson Unsolicited commercial email will be read at a cost of \$500 per message. Use of this email address implies consent to these terms. Aug 8 '06 #5

 P: n/a Dave Anderson wrote on 08 aug 2006 in microsoft.public.inetserver.asp.general: Anthony Jones wrote: >Int is the function neededEg.Int(1.62) = 1 Depending on the desired behavior for negative numbers, yes. Otherwise Fix() is the one. And since this is an ASP forum, not a VBScript one, it is worth noting that Math.floor() does the same as Int(). ... if you are using j[ava]script as asp serverside language. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress) Aug 9 '06 #6

 P: n/a Thanks guys =) "le0"

### This discussion thread is closed

Replies have been disabled for this discussion.