[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

AW: [xsl] format-number troubles


Subject: AW: [xsl] format-number troubles
From: "Szabo, Patrick \(LNG-VIE\)" <patrick.szabo@xxxxxxxxxxxxx>
Date: Tue, 20 Sep 2011 10:54:38 +0200

Thx a lot, worked like a charm.


. . . . . . . . . . . . . . . . . . . . . . . . . .
Ing. Patrick Szabo
 XSLT Developer
LexisNexis
Marxergasse 25, 1030 Wien

mailto:patrick.szabo@xxxxxxxxxxxxx
Tel.: 00431 534521573
Fax: +43 (1) 534 52 - 146


-----UrsprC<ngliche Nachricht-----

Von: Michael Kay [mailto:mike@xxxxxxxxxxxx]
Gesendet: Dienstag, 20. September 2011 10:47
An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Betreff: Re: [xsl] format-number troubles

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
Keywords