Re: [xsl] format-number troubles

Subject: Re: [xsl] format-number troubles
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Tue, 20 Sep 2011 09:46:57 +0100
On 20/09/2011 09:36, Andrew Welch wrote:
I have a string of numbers that has to be 6 digits long.
Thing is i don't want to fill up what's missing to 6 with 0 but i have
to add the 0 ad the end of the string.

How do i do that with format number ?!
It's probably very simple but i just can't seem to find the right
formatstring.
Post an example, because adding 0 at the end would make it a different number...



Try

substring(concat(string($number), '000000'), 1, 6)

Michael Kay
Saxonica

Current Thread