Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15990

Trailing zeros

$
0
0
I have numbers that can have up to 13 decimals. I need to display the number in a textbox without any trailing zeros but still display a minimum of 2 decimals even if those two decimals are zeros i.e.
50.123456789 must be displayed as 50.123456789
50 must be displayed as 50.00

I can't use a format function as #0.00 will trim the longer numbers and #0.0000000000 will display a bunch of zeros if number is shorter.

Viewing all articles
Browse latest Browse all 15990

Latest Images

Trending Articles



Latest Images