on 12-20-2005 5:27 PM
I need to fill a field with values that has variable lenght adding 0 (zeros) on the left, how can I do it ?
I'm using the LENGHT in message mapping, with value returned by LENGHT I use FIXVALUES to map the quantity of 0 (zeros) that I need to add in the field.
Somebody can help me with this problem ?
Thank's.
do u want to use a built in function?
instead write a simple user defined function with 1.
parameter and source code looks like this.
for(i=a.length;i<(ACTUAL LENGTH(XSD));I++)
a=a+"0".
return a;
that will solve ur problem and u can allot..me 10..:)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Regis,
You can use the Arithmetic:FormatNum built-in function for this.
If you want to left-pad the number with zeros so that the length is always 10, then specify 10 zeros for the format, 0000000000.
This function takes formats based on java.text.DecimalFormat so you can see all of the possibilities at:
java.sun.com/j2se/1.4.2/docs/api/java/text/DecimalFormat.html
Thanks,
Jesse
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.