Posted on 2014-01-09
I know that I can format a number to a given set of decimal places but is there anyway to format a number so that it only writes decimal places as needed?
For example, if I perform a set of calculations that result in variables (type: decimal) equaling the numbers 9, 123.0034, 5.7 and 0.02. Is there a format that I can use to give me these exact results? I do not want 9.0000, 5.7000 and 0.0200 but 123.0034 is fine.