Forums

ASP

This topic is locked

Percentage calculation Formula

Posted 24 Jan 2008 01:20:26
1
has voted
24 Jan 2008 01:20:26 Javier Castro posted:
hey again,

Hi all,

I have to calculate the percentage of an X amount depending on the Quarter of the year. It's driving me crazy, I can't figure out how to do it. Am I missing something. If someone registers the 1st quarter then the price is the full 1200. f the registration occurs the 2nd Quarter, then it is 25% less that rthe full amount. The 3rd is 50% less and the 4th is 75% less.

the amount is 1200
the Quarters of the year = 4
The regristrant is 1

(1200/4)*100 ?????

Please any help will be much appreciated.

Javier

Replies

Replied 24 Jan 2008 04:18:40
24 Jan 2008 04:18:40 Javier Castro replied:
Yes, solved. Some great guys at ASP Development helped.

<pre id=code><font face=courier size=2 id=code>strMonth = CInt(datepart("mm",now()))
select case strMonth
case 1,2,3
strAmt = 1200*1 'or 1200
case 4,5,6
strAmt = 1200*.75 'or 900
case 7,8,9
strAmt = 1200*.5 'or 600
case 10,11,12
strAmt = 1200*.25 'or 300
end select </font id=code></pre id=code>

funny, I was never good at math....I'm still not.
Cheers,

J.

Reply to this topic