Zeros after decimal point in percents

Discussions related to ReadyDoc development.
Post Reply
Miri Yosef
Posts: 67
Joined: Sun Oct 26, 2008 6:14 am

Zeros after decimal point in percents

Post by Miri Yosef »

What could I add to the code bellow so that it will not show zeros after the decimal point but will show any other number (i.e. 5.00 percent will show as 5% but 5.05 percent will show as 5.05%)
The code I am using is:
<FOREACH {{Order.Seller}}>, {{.Proceeds.Percentage PERCENT}}</FOREACH>
Mark McKenna

Re: Zeros after decimal point in percents

Post by Mark McKenna »

That is not currently supported. You can use the DECn format specifier to designate the number of decimal places to display, but the formatting will be the same regardless of significant digits in the value being presented. For example, DEC3 will result in 5.000, 5.500, 5.250, or 5.125. If you do not designate a DECn specifier, the default is 2 for floating point data, and 0 for integral data.
Miri Yosef
Posts: 67
Joined: Sun Oct 26, 2008 6:14 am

Re: Zeros after decimal point in percents

Post by Miri Yosef »

Thanks,

Miri Yosef
Post Reply