One Star

how to rounding number in the tmap

hi all i want to rouding double value in 

double 32.62 to 32.5 in to databse not done 
double 32.62 to 32 in to database done
float 32.62 in 33 in to database done 
double 32.62 in 32 and 62 in separeted rows or columns in database not done
double 32.62145 in 32.6 , 32.62 , 32.621 , 32.622 in separeted rows or columns in databse  not done 

date 10012015 in 10012016 done 
date 10012015 in 10022015 done
date 10012015 in 17012016 done 
date 10012015010000 in 10012015 done
date 32022015 in error because the date is not existent not done 


help me thanks all
and sorry for my bad english.
1 REPLY

Re: how to rounding number in the tmap

You'll need to use the java.lang.Math Round method:
for example if you have your double in the row1.double_column, to round double 32.62145 to 32.6 you would write:
java.lang.Math.round(row1.double_column * 10) / 10.0;