penguinspeaks
Technical User
Using sql db, and using asp and sql, I am having an issue.
i am storing several different int values into a db column that is set to int. now what i am trying to do, is divide one by another and have it show as a 2 decimal percentage.
the problem is when i use formatnumber, i get a mismatch error. the code is simple, but isn't working.
cont1a = food1+labor1
cont2 = formatnumber((cont1a/sales1*100), 2)
now every value in the db is int as the field type. all i am trying to do is divide and rond the decimal.
all numbers are returned correctly when called. the division works without the format number, but has a long decimal
can anyone see why this isn't working??
thanks
Bam
i am storing several different int values into a db column that is set to int. now what i am trying to do, is divide one by another and have it show as a 2 decimal percentage.
the problem is when i use formatnumber, i get a mismatch error. the code is simple, but isn't working.
cont1a = food1+labor1
cont2 = formatnumber((cont1a/sales1*100), 2)
now every value in the db is int as the field type. all i am trying to do is divide and rond the decimal.
all numbers are returned correctly when called. the division works without the format number, but has a long decimal
can anyone see why this isn't working??
thanks
Bam