Hi, plz help
i need to replace the decimal part of the number ex.
140000.01 , in this i can use [mod] function to get the decimal part of the number , now if suppose if i want to repalce .01 to .00 then what can be the code .
thx n regds
Hi, plz help
i need to replace the decimal part of the number ex.
140000.01 , in this i can use [mod] function to get the decimal part of the number , now if suppose if i want to repalce .01 to .00 then what can be the code .
thx n regds
Subject: decimal manipulation
The simple way to get this is to convert the number to integer first so that decimal parts are removed. Then add the float part of the number to anything you want.
Like -
Dim i as integer
Dim j as long
j = 140000.01
i=j (which would put 140000 in i)
j = i + 0.00
Also, you could use Rnd() function. Also, you try out with the clng() function to convert the variable to long explictly.
–Phani
Subject: RE: decimal manipulation
that was good thx
Subject: decimal manipulation
actually my code generates an an extra value of .01 instead of .00and this is the issue.
doc1.GTotal =Round(Round(bamttot,2)+Round(ServTaxttot,2)+Round(SalesTaxtot,2)+Round(cesstot,2),2)