MI Label Format Number: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
 
Line 18:
The attribute can be entered by using the Columns drop down list. For the format string, use something like “0.00” making sure that you provide the quotes. MapInfo uses the same (or very similar) formatting strings as Microsoft Excel does when formatting a Number cell. Examples are “0.00” to display to two decimal places, “0.0” to display to one decimal place. Examples from the MapInfo help are shown further below. The line entered in the dialog below is: Format$(Elevation,"0.00")
[[File:12.1.6-2.png|frame|none]]
 
</ol>
<br>
Other Examples:
<br>
<br>
Format$( 12345, ",#") ' returns "12,345"<br>
Format$(-12345, "$#") ' returns "-$12345"<br>
Format$( 12345.678, "$,#.##") ' returns "$12,345.68"<br>
Format$( 12345.678, "$,#.##;($,#.##)") 'returns "$12,345.68"<br>
Format$(-12345.678, "$,#.##;($,#.##)") 'returns "($12,345.68)"<br>
Format$(12345.6789, ",#.###") ' returns "12,345.679"<br>
Format$(12345.6789, ",#.#") ' returns "12,345.7" <br>
Format$(-12345.6789, "#.###E+00") ' returns "-1.235e+04"<br>
Format$(-12345.6789, "#.###E-00") ' returns "-1.235e04"<br>
Format$( 0.054321, "#.###E-00") ' returns "5.432e-02"<br>
Format$(0.054321, "#.##%") ' returns "5.43%"<br>
Format$(0.054321, "0.##\%") ' returns "0.05%" <br>