To translate numbers in SharePoint Dataview, SharePoint Designer generates
following code:
<xsl:value-of select="format-number(@YourField, "$#,##0.00;-$#,##0.00")"/>
Examples:
YourField Result
12345 12,345.00
1234.5 1,234.50
0.0 0.00
If YourField contains a "," you need to use the decimal-format functionality
which will get you something like this:
Outside the xsl:template block:
<xsl:decimal-format name="European" decimal-separator=',' grouping-separator='.' />
To display the field:
<xsl:value-of select='format-number(translate(@YourField,",","."), "#.##0,00", "European")'/>
Examples:
YourField Result
12345 12.345,00
1234.5 1.234,50
0.0 0,00
vrijdag 11 november 2011
How to format decimal in SharePoint Dataview
Labels:
Dataview,
SharePoint,
SharePoint Designer,
xsl
Abonneren op:
Reacties posten (Atom)
Geen opmerkingen:
Een reactie posten