Hello everyone !
I made a price calculator for a guest house.
I have diffrent sale campaigns, all the time, I made a table with campaign name and discount, for example: name "pensioners " discount "*0.9".
10% discount, now I want calculate this with the price.
The price is integer, and the discount must be a string, because of the */-
how can I calculate them anyway ?
I have tried with len/right to separate * and the number to two diffrent variables.
and then I experience two problams. one, it rounds the 0.9 to 1.
and I still can't calculate even with the 1.
UPrice & Operation & Discount ?
UPrice + Operation + Discount ?
hope you can help me out...
thanks in advance, Idan
I made a price calculator for a guest house.
I have diffrent sale campaigns, all the time, I made a table with campaign name and discount, for example: name "pensioners " discount "*0.9".
10% discount, now I want calculate this with the price.
The price is integer, and the discount must be a string, because of the */-
how can I calculate them anyway ?
I have tried with len/right to separate * and the number to two diffrent variables.
and then I experience two problams. one, it rounds the 0.9 to 1.
and I still can't calculate even with the 1.
UPrice & Operation & Discount ?
UPrice + Operation + Discount ?
hope you can help me out...
thanks in advance, Idan
Comment