Hi All,
I have a doubt here, i have an interest rate has .2750000 in the input file and i need to show it as 2.75 in the output. How do I do this in WTX?? Please help me with this.
Thanks,
Rshya.
Hi All,
I have a doubt here, i have an interest rate has .2750000 in the input file and i need to show it as 2.75 in the output. How do I do this in WTX?? Please help me with this.
Thanks,
Rshya.
This would be very bad solution..i guess.
Interestrate=".2750000"
LEFT(TRIMRIGHT(WORD(interestrate, '.', 2)),1)+"."+MID (TRIMRIGHT(WORD(interestrate, '.', 2)),1), 2,size(TRIMRIGHT(WORD(interestrate, '.', 2))))
Any better solutions welcome
Thanks vijji_WTX for your response. But the below code worked for me:
IF(MID(LEFT(RIGHT(TRIMRIGHT(interestRate Comp:In1), 6), 1) + "." + RIGHT(TRIMRIGHT(interestRate Comp:In1), 5), 5, 1) = "0", LEFT(LEFT(RIGHT(TRIMRIGHT(interestRate Comp:In1), 6), 1) + "." + RIGHT(TRIMRIGHT(interestRate Comp:In1), 5), 4), LEFT(LEFT(RIGHT(TRIMRIGHT(interestRate Comp:In1), 6), 1) + "." + RIGHT(TRIMRIGHT(interestRate Comp:In1), 5), 5))
So for ex: if input has .123400, it gave me 1.234
If input had .123000, it gave me 1.23 also if input had .100000 it gave me 1.00. Unless the 3rd digit from the decimal is an actual value, it always gave me 1.00/2.99 format.
Thanks for the idea from your code :)
Thanks,
Rshya
Good to know this and happy to see this "
Thanks for the idea from your code :)
I might be missing a trick here but - why don't you just multiply the number by 10?
Very true TarunB...but I am trying to attain it for a text field.
Thanks,
Rshya
You can change that to text by using NUMBERTOTEXT function.
Ex:
NUMBERTOTEXT(Interestrate*10)
Regards
Gopi