Decimal format

22/10/2007 - 10:28 por Decimal Number Problems | Informe spam
I have a custom list with autocalculate field (Number) then in sharepoint
designer I enter a xls datasource a dataview, and total sum like;

Header --> Work Hours
Line 1 --> Work1 1,20
Line 2 --> Work2 3,50
Line 3 --> Total 4,70

the first problem is that in the line 1 Hour I have NAN, because the output
format of the datasource is #,##0.00 (english number format) then I can't
convert in a number

The second problem is with the sum because $nodeset/@Hours containt a group
of nodes with 1,20 and 3,50 them I can't do this sum

I know that it's languajes insue, but I can't find the solution PLEASE HELP!!!
 

Leer las respuestas

#1 Fabian Imaz
24/10/2007 - 16:46 | Informe spam
Hola,

Antes que nada te pido disculpas por mi ingles, capaz no es el mejor :)

En el siguiente codigo que te adjunto establezco el formato que quiero que
se utilice en mi XSLT para darle formato a los nros.
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:decimal-format name="euro" decimal-separator=","
grouping-separator="."/>
<xsl:template match="/">
<xsl:value-of
select="format-number(26825.8, '#.###,00', 'euro')"/>
</xsl:template></xsl:stylesheet>

Como veras estoy utilizando "decimal-format" en la declaracion del XSLT para
establecer el formato que deseo que utilice, después simplemente utilizo la
función "format-number" para formatear la salida de una variable.

Mi correo es , cualquier cosa a las ordenes.

Saludos,
Fabián Imaz
Siderys Elite Software
http://www.siderys.com


"Decimal Number Problems" wrote:

Mostrar la cita

Preguntas similares