Start a new topic
Solved

How to set decimal precision

How do i set my result (float value) to 2 decimal places? Round function does not have option of setting the no. of decimal places. If we set the value as float , the result is showing many no. of decimal digits.


image

HI, This can be achieved by multiplying by 100 and then rounding the number (to remove values after 2 decimals) and then dividing by 100 again to get values upto 2 decimal points

This worked. Thank you so much. 

Login to post a comment