Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Steve Bloodsworth
  Where is Steve Bloodsworth?
 Sarasota
 Florida - United States
 Steve Bloodsworth
 Tags
Subject: Decimal Conversion to String
Thread ID: 22109 Message ID: 22109 # Views: 19 # Ratings: 0
Version: Visual FoxPro 8 Category: General VFP Topics
Date: Wednesday, April 09, 2003 5:50:11 PM         
   


Here's what's happening:

lnValue=700.231

?ALLTRIM(STR(lnValue)) && Rounds.. Yuk
700

?ALLTRIM(STR(lnValue,20,6)) && Too Many Zeros at the End, and 6 is a wild guess as to how long it will be.. Yuk
700.231000

?TRANSFORM(lnValue) && Sticks to the SET DECIMAL value... Yuk
700.23


I need to get the string value of this number (including all of the decimal places). Do I need to make a function that starts at the end and counts backwards to remove the zeros, or is there a function that can handle this pure transformation, considering that lnValue can have any number of decimal places?

Thank you,

~Steve




COMPLETE THREAD

Decimal Conversion to String Posted by Steve Bloodsworth @ 4/9/2003 5:50:11 PM
RE: Decimal Conversion to String Posted by Yu-Wah Cheung @ 4/9/2003 6:24:19 PM
RE: Decimal Conversion to String Posted by Steve Bloodsworth @ 4/9/2003 6:52:54 PM