Help needed

Hi all,

if i pass a value like 23.00 to string variable, i need to get 23 into outstring which is very much possible with numericFormat built in service. where as in the run time if the value comes 23.34 or something else i nedd as it is value ie 23.45
if i use numericFormat built in service it is rounding the value which is 23.45 to 23 and 23.50 to 24.

Is there any other built in service or i need to write java service for this.
if there is no java service , anybody help me to write java code please.

Ramesh

Ramesh,

  You need the value to be 23 when you give 23.1 or 23.9 
  Did you try string manipulation? Like search for the character "." and take the substring before the character "." and use numaricFormat after you get the string from substring function. 

I used the following flow service.
1 INVOKE indexOf
2 BRANCH on ‘/value’
2.1 -1: SEQUENCE
2.11 INVOKE length
2.12 INVOKE substring
2.2 $default: INVOKE substring

let’s see if someone gives better answer.

have u used the pattern properly while using numericFormat

Run numericFormat
with num= 23.45
pattern=##.##

u will get 23.45

if num is 23.455
result will be 23.46

if u enter 23.50
u will get 23.5

if u enter 23.00
u will get 23

Hi Borah,

Your solution works great.
before that actually i am using the pattern ###.
now i changed it to ##.##

Thanks for your help.

Ramesh