By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,880 Members | 2,279 Online
Bytes IT Community
+ Ask a Question
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
le0
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
Share this Question
Share on Google+
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" <ro******@gmail.comwrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
>
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 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().
... 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
le0
Thanks guys =)

"le0" <le*********@gmail.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
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 10 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.