xsl-list
[Top] [All Lists]

[xsl] format string with leading zeros

2012-01-04 09:46:39
 
Hi 
I have following scenario, the itemCode field  must be 14 digits lang. I try to 
ignore the last two decimals of the itemCode field if the itemCode is more than 
14 digits long (16 digits). And if the itemCode has less than 14,  fill field 
with leading zeros so that the itemCodeCode is still 14 digits long.
 
Input Example(1): itemCode : 0.0123456789 
output itemCode: 000.0123456789
 
Input Example(2): itemCode : 0.01111123456789 
output itemCode: 0.011111234567
Thanks you

--~------------------------------------------------------------------
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>
--~--