cancel
Showing results for 
Search instead for 
Did you mean: 

right justification of floating point values

Former Member
0 Kudos

Hi all

i need to convert a incoming floating point value into (8.2) format i.e. (33678.9956 into 33678.99) i.e. spaces should be padded before if number of digits before decimal is less than 8 and i need to right justify all the incoming values..

pls help me in doing that through graphical mapping.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Try using the Format Number . I would use the mask ##########.##

Former Member
0 Kudos

Hi Barry

By using that we may get the required the required format..but , i want the field to be right justified as shown below.

12345678.00

2.00

3333.99

333423.90

Thanks

Manohar

Former Member
0 Kudos

Hi Barry,

sorry, the format given in the previous post is incorrect...

the required format is just opposite to that..i.e. all DOTS in the same column.

hope my requirement is clear..

Regards,

Manohar

Former Member
0 Kudos

Aren't numbers right justified by default?

And text to the left?

The format number works fine for me...

Try it and run some test data through locally....

Former Member
0 Kudos

you might give this as string in datatype so you need to write a java function for this. otherwise change it number use numberformat option

Regards

Sreeram.G.Reddy

Former Member
0 Kudos

yes.. it is given as string datatype..and i am not supposed to use an UDF here,and the dta type cannot be changed to number..

Is there any other way?

Former Member
0 Kudos

Ram,

As per as I know their no other option then one which is speicifed above.

By default text is left justified unless we do it java function or number you cant change it.

Regards

Sreeram.G.Reddy