Round in tmap

One Star

Round in tmap

Hi guys
I have a couple of double values in my db that i Need to round.
For example i have a value like
112.81481481 my Goal is to get this like 112.80
I set Mathematical.FFIX(MyValue,2) to only get .## but it gives med 112.81
I Need to set the last number as a 0 or a 5.
If Mathematical.FFIX(MyValue,2) gives me this values i have to round the last number like this
112.84 = 112.85 
112.82 = 112.80
112.88 = 112.90
How can i do that in tmap?
Seventeen Stars

Re: Round in tmap

There is no build-in routine to achieve this. But you can always write your own routines. A routine like the one you mentioned is nothing else than a public class with public static methods and some special comments (unfortunately not in the java doc format) to make that method available for the content assistent and the value expression editors.
I suggest you take a look into the routine you already know and build your own one.
You will find all routines under the Code node on the left side in the repository view.
One Star

Re: Round in tmap

Hi! all 
i have a float input 347.88,126.21
i want how to convert the round integer value
i want output 348 and 126. Anyone help me
Moderator

Re: Round in tmap

Hi kumar22011993,
You can use tMap to round up your data.
Best regards
Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.