Running Bear
06-11-2003, 03:04 PM
Hi,
I'm using ASP to perform a simple percentage calculation and I'm getting incorrect results????
Dim pct ' % calculated from the vals of x & y
Dim x ' Value of the count x 3
Dim y ' Value to be used to calc %
Dim z ' Value returned from the date difference
x = 102
y = 102
pct = (100 \ x) * y
returns 0 - !!!??
Here are some more examples -
X=15
Y =13
(100\15)*13=78%
X=102
Y =102
(100\102)*102=0%
X=27
Y =26
(100\27)*26=78%
X=6
Y =6
(100\6)*6=96%
X=24
Y =21
(100\24)*21=84%
X=6
Y =6
(100\6)*6=96%
X=6
Y =6
(100\6)*6=96%
Any help or guidance would/will be greatly appreciated :D
Cheers Al
I'm using ASP to perform a simple percentage calculation and I'm getting incorrect results????
Dim pct ' % calculated from the vals of x & y
Dim x ' Value of the count x 3
Dim y ' Value to be used to calc %
Dim z ' Value returned from the date difference
x = 102
y = 102
pct = (100 \ x) * y
returns 0 - !!!??
Here are some more examples -
X=15
Y =13
(100\15)*13=78%
X=102
Y =102
(100\102)*102=0%
X=27
Y =26
(100\27)*26=78%
X=6
Y =6
(100\6)*6=96%
X=24
Y =21
(100\24)*21=84%
X=6
Y =6
(100\6)*6=96%
X=6
Y =6
(100\6)*6=96%
Any help or guidance would/will be greatly appreciated :D
Cheers Al