Re: VFP Rounding

Author: Fred Taylor

Posted: 2010-05-04 at 18:14:23

You can try this. SET DECIMALS TO 1 more than you're formatting, in your

case 3. Then use TRANSFORM(your number,"99999999999999999.99") to get it as

a string. As long as the SET DECIMAL is at least 1 more than you're

formatting to, it will truncate, not round.

Fred

On Tue, May 4, 2010 at 3:00 PM, Tina Currie <tina@datahouse.com.au> wrote:

> Hi all,

>

>

>

> Hoping you can shed some light for me. I've got a calculation that I'm

> doing over 4 fields and then I convert the result to character by applying

> STR() function - doing this to a length of 20 and decimal places of 2.

> This

> rounds UP my result. I don't want this to happen. Just want it to give me

> the result to 2 decimal places.

>

>

>

> Is this possible in Fox?

>

>

>

> TIA,

>

>

>

> Tina

>

>

>

>

>

>

>

>

>

>

>

>

>

>

>

> --- StripMime Report -- processed MIME parts ---

> multipart/alternative

> text/plain (text body -- kept)

> text/html

> ---

>

[excessive quoting removed by server]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/s2g3392e7101005041514i142c785jc402b68c44eae2cd@mail.gmail.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2010 Fred Taylor