Subject Re: convert a number like 1174.88 to a character field
From Lee Grant <camilee@nospam.comcast.net>
Date Sat, 6 Dec 2025 01:24:00 -0500
Newsgroups dbase.getting-started

Ken,

That would be the function property of @R "@R 9,999.99" which will
format the number with place holders that will appear in printout but
not in the field (comma, and period (or decimal separator)) to allow the
number to only appear like this, without rounding any said number,
unless someone coded the conversion of a variable and then fed it to
this, then the number would already be rounded up or down per that
coding, not this format via Picture and Function formatting.

Lee

On 12/4/2025 8:13 AM, Ken Mayer wrote:
> On 12/3/2025 7:02 PM, Ken Mayer wrote:
>> On 12/3/2025 5:09 PM, ed furche wrote:
>>> i get a character field that rounds off the cents   i want to see
>>> "1174.88" not "1175"
>>> my code -   store ltrim(rtrim(str(amt))) to stramt.
>>
>>
>> str( 1174.88, 8 , 2, "9,999.99" )
>>
>> Look at this function in help. You're doing too much work here.
>>
>
> ?ltrim(str( 1174.88, 8 , 2 ))
>
> I know it's possible to use a picture (such as "9,999.99") in some
> version of this, and I can never remember the function ... (there are
> places the help could be more useful ... but oh well).
>
> Ken
>