Home All Groups Group Topic Archive Search About

how to find quoteint in asp



Author
3 Nov 2007 1:16 PM
vinodkus
dear sir/madam

can u tell me how to find the quoteint in asp
for e.g
290 / 100 = 2
I want result 2 but it gives 2.9
Please help me
Thanks in advance

Author
3 Nov 2007 2:25 PM
McKirahan
<vinod***@gmail.com> wrote in message
news:1194095794.452966.292430@19g2000hsx.googlegroups.com...
> dear sir/madam
>
> can u tell me how to find the quoteint in asp
> for e.g
> 290 / 100 = 2
> I want result 2 but it gives 2.9
> Please help me
> Thanks in advance

The result is 2.9!

"In mathematics, a quotient is the end result of a division problem."
URL:http://en.wikipedia.org/wiki/Quotient

Do  you want only the digits to the left of the decimal only?

Is this what your looking for?
    FormatNumber(290/100-.5,0)
Author
3 Nov 2007 2:25 PM
Dave Anderson
<vinod***@gmail.com> wrote:
> can u tell me how to find the quoteint in asp
> for e.g
> 290 / 100 = 2
> I want result 2 but it gives 2.9

ASP is not a language.

There are many possible ways to interpret your question, so I'll give you
two answers:

JScript:     Math.floor(290/100)
http://msdn2.microsoft.com/en-us/library/sw6w4wz7.aspx

VBScript:    290 \ 100
http://msdn2.microsoft.com/en-us/library/bzydt0tx.aspx



--
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.
Author
3 Nov 2007 7:50 PM
Evertjan.
Dave Anderson wrote on 03 nov 2007 in
microsoft.public.inetserver.asp.general:

> JScript:     Math.floor(290/100)

or:

(290/100)|0



--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Author
4 Nov 2007 12:52 AM
Dave Anderson
"Evertjan." wrote:
>> JScript:     Math.floor(290/100)
>
> or:
>
> (290/100)|0

Sigh. Or any of these:

    parseInt(290/100,10)
    Math.pow(2,Math.floor(Math.log(290/100)/Math.LN2))
    String(290/100).replace(".","").length

As I said, the question can be interpreted many ways. The OP didn't even
suggest what -290/100 should yield.



--
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.

AddThis Social Bookmark Button