xsl-list
[Top] [All Lists]

Re: [xsl] format-number round is not desired

2012-04-23 04:26:56
Hi guys
There is still a penalty, now If the number is negative the floor 
funciton rounds!
Sample:
$var = - 20624.50
output = -0000000020625
-------------------------------------
The output should be -0000000020624
?


 
----- Ursprüngliche Message -----
Von: henry human <henry_human(_at_)yahoo(_dot_)de>
An: "xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com" 
<xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
CC: 
Gesendet: 15:09 Donnerstag, 19.April 2012
Betreff: Re: [xsl] format-number round is not desired

Hi all!
That is the solution!
Thanks a lot!
Kind regards
Hen

----- Ursprüngliche Message -----
Von: Martin Honnen <Martin(_dot_)Honnen(_at_)gmx(_dot_)de>
An: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
CC: 
Gesendet: 13:59 Donnerstag, 19.April 2012
Betreff: Re: [xsl] format-number round is not desired

henry human wrote:
Hello
I have following :
$var = 206000.7625
<xsl:value-of select="format-number($var ,'00000000000000;00000000000000') "/>
Output is  00000000206001
As you see the output is rounded, what is not desired!
This should be the output: 00000000206000
(the same as in  $var = 206000)

Does
  format-number(floor($var), '00000000000000;00000000000000')
do what you want?


-- 
    Martin Honnen --- MVP Data Platform Development
    http://msmvps.com/blogs/martin_honnen/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--