## To Remove Decimal in Amount field

## To Remove Decimal in Amount field

(OP)

I have Amount field which have value as below say

148.90,148.99

Requirement is to remove the decimal and left pad with zero's.Precision is 9

Value 148.99 is converted correctly as 000014899 but coming to 148.90 its displaying as 000001489, but testers claims it to be

000014890

When we convert a number removing decimal there is no value for 0 i.e. it takes value 148.90 as 148.9 so while removing and left padding its displaying as 000001489.

Kindly help me with the situation

148.90,148.99

Requirement is to remove the decimal and left pad with zero's.Precision is 9

Value 148.99 is converted correctly as 000014899 but coming to 148.90 its displaying as 000001489, but testers claims it to be

000014890

When we convert a number removing decimal there is no value for 0 i.e. it takes value 148.90 as 148.9 so while removing and left padding its displaying as 000001489.

Kindly help me with the situation

## RE: To Remove Decimal in Amount field

1. Multiply by 100

2. Cast to integer

3. Cast to string

4. Add leading zero's by padding

?

Ties Blom

## RE: To Remove Decimal in Amount field

i am taking it i am taking it as precision 9 and scale 2

Then o/p is coming as say 1239.9000 or 13456.000 so if it is the case i should get number as 000123990 and 001345600

Including digit it is taking number upto 9 length.

In this case how can we multiply with 100

Kindly suggest

## RE: To Remove Decimal in Amount field

How is your input represented? Is it decimal, float, implied decimal, string, etc?

and your output is implied decimal point of 2 in a string format?

"I think we're all Bozos on this bus!" - Firesign Theatre

## RE: To Remove Decimal in Amount field

Output should be length 9 with padded to zeroes.

Example:

benededuct (benededuct:Double:): "1500.000000000000"

maxoutaccrual (maxoutaccrual:Double:): "3600.000000000000"

lifetimeaccrual (lifetimeaccrual:Double:): "8400.000000000000"

accumvalue1_v (accumvalue1_v:Double:): "101.5000000000000"

accumvalue2_v (accumvalue2_v:Double:): "752.0000000000000"

accumvalue3_v (accumvalue3_v:Double:): "1000.500000000000"

DeductibleAmt_V0 (DeductibleAmt_V0:Double:): "1601.500000000000"

CopayMOPSAmt_v0 (CopayMOPSAmt_v0:Double:): "4352.000000000000"

LifetimeMaxAmt_v0

I should add benededuct+accumvalue1

Maxoutaccrual+accumvalue2

Lifetimeaccrual+accumvalue3

## RE: To Remove Decimal in Amount field

I have used the above Expression

and amoounts for amounts like 160150 is displaying correctly but value 4352 is supposed to be 435200

but it is displaying as 4352 only

## RE: To Remove Decimal in Amount field

"I think we're all Bozos on this bus!" - Firesign Theatre

## RE: To Remove Decimal in Amount field

## RE: To Remove Decimal in Amount field

If you do what Ties suggested, you would always multiply by 100, which gives you the trailing zeroes. Once it's converted to integer, you will drop any extra digits past the decimal. Then convert to string and left pad. No need to check for a decimal point.

"I think we're all Bozos on this bus!" - Firesign Theatre