# Is this possible with formatNum

Hi All,

My source field is of the format N(13,3) , (A Numeric field of lenth 13, out of which last 3 are decimal places and no decimal point ). I need to insert decimal point and map it to the Target Field.

if the input is 1234567890123 then output should be 1234567890.123

if it is 12345 then 12.345

Is it possible with formatNum function? If so, pls tell the parameters to be given for the function.

##### Sarvesh Singh replied

Hi,

Use this UDF and your porblem will be solved..

see the link for results

http://www.flickr.com/photos/23639237@N02/2920517443/

Under Imports: java.math.BigDecimal;

if( ! a.equals("")) { BigDecimal bigA = new BigDecimal(a); BigDecimal result = bigA.movePointLeft(3); return result.toString(); } return "000";

Regards,

Sarvesh