I am doing a Simple Maths action to calculate a percentage (actually 2 - I multiply the numerator by 100, then divide it by the denominator). The resulting variable is a Variant, and ends up with 12 digits after the decimal point. I only want 1 or 2 digits after the decimal, e.g. 75.2 or 70.34.
Is there a way to format a variable when displaying it? I could not see a way to do that, and since it is a Variant, the format field is not open in the variable definition window. I figure I must be missing something.
Thanks,
Jonathan
The formatstring doesn’t apply to variants because it’s not possible (the format function we call cannot deal with variants). Is there any reason you don’t use a Float variable type to store your result?