Page 1 of 1

Remove Leading Zeros for Decimal field

Posted: Tue Aug 07, 2012 2:50 pm
by DWS
I think there should be some posts for this type topic. But I could not find them. If anyone of you knows this, please let me know.

Thank you very much in advance.

General speaking this issue is:

When a dataset file with a decimal field is created, it will formate leading zeros if necessay.

My question is: how to remove the leading zeros?

Posted: Tue Aug 07, 2012 4:20 pm
by chulett
My question is: why worry about them? If you really want to store the number without them, you'll need to convert it to and store it as a string.

Posted: Tue Aug 07, 2012 5:32 pm
by ray.wurlod
There are no leading zeroes stored in the Data Set. These are only added when the data are displayed. (They are also added when decimal values are converted to string, such as when writing to a text file.)

Posted: Tue Aug 07, 2012 5:50 pm
by chulett
Aha... trick question! :lol: