Hi all,
I'm trying to find a way to get rid of trailing zeros (0) from numbers (decimals only), but the number of decimals differs with each record and there is no set number of decimals in the end result.
So I need to get something like:
123.456 -> 123.456
123.450 -> 123.45
123 -> 123
123.45670 -> 123.4567
Is the a nice manner in which to do this?
I was looking at finding out the number of decimals first, convert it totext and do the old fashioned loop. However, I can't determine the length of a number
Any ideas? Besides converting it totext with like 100 decimals and then looping
I'm trying to find a way to get rid of trailing zeros (0) from numbers (decimals only), but the number of decimals differs with each record and there is no set number of decimals in the end result.
So I need to get something like:
123.456 -> 123.456
123.450 -> 123.45
123 -> 123
123.45670 -> 123.4567
Is the a nice manner in which to do this?
I was looking at finding out the number of decimals first, convert it totext and do the old fashioned loop. However, I can't determine the length of a number
Any ideas? Besides converting it totext with like 100 decimals and then looping