activejunkie
Programmer
Hi,
I have a requirement where from a string we need to derive the amount and also based on the alphabet we need to make it negative or positive amount. Here is the string
'1047383658000012345678990000002014083J354310020140850000005335R0000'
In this string '0000005335R' is the amount with 2 decimals 000000533.5R
We need to decode A = 1, B= 2 till I = 9 and J = 1 with negative values till S = 9(negative)
so the final output in this string should be:
if the string is '1047383658000012345678990000002014083J354310020140850000005335A0000'
output should be 533.51
if the string is '1047383658000012345678990000002014083J354310020140850000005335S0000'
output should be -533.59
I need expert help on this asap.
Thanks.
I have a requirement where from a string we need to derive the amount and also based on the alphabet we need to make it negative or positive amount. Here is the string
'1047383658000012345678990000002014083J354310020140850000005335R0000'
In this string '0000005335R' is the amount with 2 decimals 000000533.5R
We need to decode A = 1, B= 2 till I = 9 and J = 1 with negative values till S = 9(negative)
so the final output in this string should be:
if the string is '1047383658000012345678990000002014083J354310020140850000005335A0000'
output should be 533.51
if the string is '1047383658000012345678990000002014083J354310020140850000005335S0000'
output should be -533.59
I need expert help on this asap.
Thanks.