Page 1 of 1

chopping decimals

Posted: Wed Dec 05, 2007 3:25 am
by scorpion
all,

i am getting values in my output file for one of my columns are like:

102.34
-103.68
108.98
-45.08
etc etc

but requirement is to get absolute values(to remove '-' symbol)

i used Abs function in my transformer for that perticular calculation,but when i tried with the function ,the decimals are chopped off.

i am getting values like..

102,
103.
108
etc etc.....

how to get absolute values without decimal values are chopped off.

thanks for the help.

Posted: Wed Dec 05, 2007 3:35 am
by Maveric
You might want to investigate the function called Neg under Mathematical.

Posted: Wed Dec 05, 2007 8:15 am
by landaghaar
in the worst case, put an If statement and if any number is < 0 then multiply it by -1 else take it as it is.

Posted: Wed Dec 05, 2007 10:50 am
by ArndW
If you have fixed decimal to 2 places, do "ABS(In.Column*100)/100"