Skip to Content
0
Jan 28 at 08:13 AM

How to Pad zeros including decimal values

237 Views

Hi,

I have an requirement to pad 7 zeros including decimal values.

eg:

1.25 -> 0001.25

2.00 -> 0000002

170.00 -> 0000170

if zero's after decimal, then it can be ignored, if values after decimal then it should be padded in 7 characters including decimal value.

Please guide.

Thanks,

Vinoth