Decimal data

Hi,
I stuck to develop following logic:-

If data= 125.00 Then i want output 125 (If data is having zeros after decimal then remove zeros.)
If data = 125.01 then i want output 125.01 (If data is having value after decimal then data=output)

Can this is possible?

(Assign) finalOutput = StringVar.Replace(".00","")
and print finalOutPut

1 Like

@Jayesh_678
It is recommended to work always on number base and to avoid side efffect by string manipulations on number values represented as string.

Trunc function will help. Do a play round with this:

1 Like