Re: Format a string into a decimal and keep leading zeros.



The leading zeros are formatting of the output. Progress does not
store them. If you need to see them when the value is displayed you
will need to apply a format mask to the display field, such as

display my-filed format "999999"

which will give you the display value 024260.

Strictly, of course both the values you show are integers, not
decimal.

On 29 Nov 2005 08:28:18 -0800, "chefsride" <k.harnden@xxxxxxx> wrote:

>I am working a project that I am reading in information from an excel
>spread***. There is a column that is brought in as a string. The
>column may have something like 02426089000. Now I have to break this
>string up into two parts. This works just fine. The problem is that I
>have to cast these strings into decimals. When I create the two string
>they look like this 024260 and 89000. When I update the database I want
>the leading zeros to get into the database. When I update the database
>now I get 24260 and 89000 as the two values. Does anyone know how to
>force the leading zero into the database without changing the database
>schema because the database we are using is being used by a program
>that we only have r-code for so we can not recompile the whole program
>to make that change.
.