Page 1 of 1
How to use numeric (#)place holder
Posted: Thu Jul 17, 2014 8:34 am
by BariAbdul
I am trying to use NumberToStringEx but I am not clear about the (# placeholder) explaination given in the TM1 User Guide on Page Number 213.Could some one please explain with an example how it really works.Thanks
Re: How to use numeric (#)place holder
Posted: Thu Jul 17, 2014 8:41 am
by Alan Kirk
BariAbdul wrote:I am trying to use NumberToStringEx but I am not clear about the (# placeholder) explaination given in the TM1 User Guide on Page Number 213.Could some one please explain with an example how it really works.Thanks
That particular one works the same way as Excel's number formatting does. (As you probably know, not all Excel formatting translates to TM1, but this does.) Specifically, from
this MS Page:
0 (zero) This digit placeholder displays insignificant zeros if a number has fewer digits than there are zeros in the format. For example, if you type 8.9, and you want it to be displayed as 8.90, use the format #.00.
# This digit placeholder follows the same rules as the 0 (zero). However, Excel does not display extra zeros when the number that you type has fewer digits on either side of the decimal than there are # symbols in the format. For example, if the custom format is #.##, and you type 8.9 in the cell, the number 8.9 is displayed.