how to find quoteint in asp

how to find quoteint in asp

am 03.11.2007 14:16:34 von 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

Re: how to find quoteint in asp

am 03.11.2007 15:25:32 von McKirahan

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)

Re: how to find quoteint in asp

am 03.11.2007 15:25:52 von Dave Anderson

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.

Re: how to find quoteint in asp

am 03.11.2007 20:50:15 von exjxw.hannivoort

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)

Re: how to find quoteint in asp

am 04.11.2007 01:52:12 von 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.