Hi All,

I am sure there is an answer to this that I don't know of!

I need to concatenate strings and values and display decimals as strings.

For example:
?"Amount Due: $. " + STR(14.2)
displays
Amount Due: $. 14

Is it possible to diplay the string as
Amount Due: $. 14.2

Thanks.

Re: How to make STR(14.2) display 14.2 as string? by Mike

Mike
Sun Feb 13 05:56:39 CST 2005

?"Amount Due: $. " + transform(14.2,'99.9')

"kd" <kd@discussions.microsoft.com> wrote in message
news:B7F994C6-AEC3-4D0C-AC9F-52D2B807DA60@microsoft.com...
> Hi All,
>
> I am sure there is an answer to this that I don't know of!
>
> I need to concatenate strings and values and display decimals as strings.
>
> For example:
> ?"Amount Due: $. " + STR(14.2)
> displays
> Amount Due: $. 14
>
> Is it possible to diplay the string as
> Amount Due: $. 14.2
>
> Thanks.



Re: How to make STR(14.2) display 14.2 as string? by Thierry

Thierry
Sun Feb 13 06:03:46 CST 2005

hi,

?"Amount Due: $. " + Transform(14.2)

or

?"Amount Due: $. " + Str(14.2, 6,1)

--
Thierry


"kd" <kd@discussions.microsoft.com> a écrit dans le message de news:
B7F994C6-AEC3-4D0C-AC9F-52D2B807DA60@microsoft.com...
> Hi All,
>
> I am sure there is an answer to this that I don't know of!
>
> I need to concatenate strings and values and display decimals as strings.
>
> For example:
> ?"Amount Due: $. " + STR(14.2)
> displays
> Amount Due: $. 14
>
> Is it possible to diplay the string as
> Amount Due: $. 14.2
>
> Thanks.



Re: How to make STR(14.2) display 14.2 as string? by Stephen

Stephen
Sun Feb 13 06:21:05 CST 2005

STR() requires a second parameter to tell it how many decimal places to
display. Try this:

lnValue = 123.45
? STR(lnvalue,2)
lnvalue = 14.1
? STR(lnvalue,1)

I always use LTRIM() as well to get rid of the leading spaces:

? LTRIM(STR(lnvalue,1))

Sincerely

Stephen

"kd" <kd@discussions.microsoft.com> wrote in message
news:B7F994C6-AEC3-4D0C-AC9F-52D2B807DA60@microsoft.com...
> Hi All,
>
> I am sure there is an answer to this that I don't know of!
>
> I need to concatenate strings and values and display decimals as strings.
>
> For example:
> ?"Amount Due: $. " + STR(14.2)
> displays
> Amount Due: $. 14
>
> Is it possible to diplay the string as
> Amount Due: $. 14.2
>
> Thanks.



Re: How to make STR(14.2) display 14.2 as string? by Mike

Mike
Sun Feb 13 06:39:30 CST 2005

Have you tried this?

> lnValue = 123.45
> ? STR(lnvalue,2)

The second parameter in this example is "how many characters to display"
rather than the decimals. If you are going to use this technique, you'll
require a third parameter, how many decimals to show.

lnValue = 123.45
? STR(lnvalue,2) && Show **

lnValue = 123.45
? STR(lnvalue,6,2) && shows 123.45





"Stephen & Shelagh Ibbs" <stephen@ibbs.org.uk> wrote in message
news:RCHPd.99631$K7.1312@fe2.news.blueyonder.co.uk...
> STR() requires a second parameter to tell it how many decimal places to
> display. Try this:
>
> lnValue = 123.45
> ? STR(lnvalue,2)
> lnvalue = 14.1
> ? STR(lnvalue,1)
>
> I always use LTRIM() as well to get rid of the leading spaces:
>
> ? LTRIM(STR(lnvalue,1))
>
> Sincerely
>
> Stephen
>
> "kd" <kd@discussions.microsoft.com> wrote in message
> news:B7F994C6-AEC3-4D0C-AC9F-52D2B807DA60@microsoft.com...
>> Hi All,
>>
>> I am sure there is an answer to this that I don't know of!
>>
>> I need to concatenate strings and values and display decimals as strings.
>>
>> For example:
>> ?"Amount Due: $. " + STR(14.2)
>> displays
>> Amount Due: $. 14
>>
>> Is it possible to diplay the string as
>> Amount Due: $. 14.2
>>
>> Thanks.
>
>



Re: How to make STR(14.2) display 14.2 as string? by Stephen

Stephen
Sun Feb 13 16:21:19 CST 2005

Sorry Mike, you are absolutely right - answer in haste, repent at leisure

Stephen

"Mike Gagnon" <mgagnon23@hotmail.com> wrote in message
news:%23tLpQkcEFHA.624@TK2MSFTNGP15.phx.gbl...
> Have you tried this?
>
>> lnValue = 123.45
>> ? STR(lnvalue,2)
>
> The second parameter in this example is "how many characters to display"
> rather than the decimals. If you are going to use this technique, you'll
> require a third parameter, how many decimals to show.
>
> lnValue = 123.45
> ? STR(lnvalue,2) && Show **
>
> lnValue = 123.45
> ? STR(lnvalue,6,2) && shows 123.45
>
>
>
>
>
> "Stephen & Shelagh Ibbs" <stephen@ibbs.org.uk> wrote in message
> news:RCHPd.99631$K7.1312@fe2.news.blueyonder.co.uk...
>> STR() requires a second parameter to tell it how many decimal places to
>> display. Try this:
>>
>> lnValue = 123.45
>> ? STR(lnvalue,2)
>> lnvalue = 14.1
>> ? STR(lnvalue,1)
>>
>> I always use LTRIM() as well to get rid of the leading spaces:
>>
>> ? LTRIM(STR(lnvalue,1))
>>
>> Sincerely
>>
>> Stephen
>>
>> "kd" <kd@discussions.microsoft.com> wrote in message
>> news:B7F994C6-AEC3-4D0C-AC9F-52D2B807DA60@microsoft.com...
>>> Hi All,
>>>
>>> I am sure there is an answer to this that I don't know of!
>>>
>>> I need to concatenate strings and values and display decimals as
>>> strings.
>>>
>>> For example:
>>> ?"Amount Due: $. " + STR(14.2)
>>> displays
>>> Amount Due: $. 14
>>>
>>> Is it possible to diplay the string as
>>> Amount Due: $. 14.2
>>>
>>> Thanks.
>>
>>
>
>



Re: How to make STR(14.2) display 14.2 as string? by Mike

Mike
Sun Feb 13 16:49:17 CST 2005

No problemo


"Stephen & Shelagh Ibbs" <stephen@ibbs.org.uk> wrote in message
news:zpQPd.92921$B8.89343@fe3.news.blueyonder.co.uk...
> Sorry Mike, you are absolutely right - answer in haste, repent at leisure
>
> Stephen
>
> "Mike Gagnon" <mgagnon23@hotmail.com> wrote in message
> news:%23tLpQkcEFHA.624@TK2MSFTNGP15.phx.gbl...
>> Have you tried this?
>>
>>> lnValue = 123.45
>>> ? STR(lnvalue,2)
>>
>> The second parameter in this example is "how many characters to display"
>> rather than the decimals. If you are going to use this technique, you'll
>> require a third parameter, how many decimals to show.
>>
>> lnValue = 123.45
>> ? STR(lnvalue,2) && Show **
>>
>> lnValue = 123.45
>> ? STR(lnvalue,6,2) && shows 123.45
>>
>>
>>
>>
>>
>> "Stephen & Shelagh Ibbs" <stephen@ibbs.org.uk> wrote in message
>> news:RCHPd.99631$K7.1312@fe2.news.blueyonder.co.uk...
>>> STR() requires a second parameter to tell it how many decimal places to
>>> display. Try this:
>>>
>>> lnValue = 123.45
>>> ? STR(lnvalue,2)
>>> lnvalue = 14.1
>>> ? STR(lnvalue,1)
>>>
>>> I always use LTRIM() as well to get rid of the leading spaces:
>>>
>>> ? LTRIM(STR(lnvalue,1))
>>>
>>> Sincerely
>>>
>>> Stephen
>>>
>>> "kd" <kd@discussions.microsoft.com> wrote in message
>>> news:B7F994C6-AEC3-4D0C-AC9F-52D2B807DA60@microsoft.com...
>>>> Hi All,
>>>>
>>>> I am sure there is an answer to this that I don't know of!
>>>>
>>>> I need to concatenate strings and values and display decimals as
>>>> strings.
>>>>
>>>> For example:
>>>> ?"Amount Due: $. " + STR(14.2)
>>>> displays
>>>> Amount Due: $. 14
>>>>
>>>> Is it possible to diplay the string as
>>>> Amount Due: $. 14.2
>>>>
>>>> Thanks.
>>>
>>>
>>
>>
>
>