Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Numbers
Message
 
 
To
24/07/2007 18:30:30
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01243124
Message ID:
01243348
Views:
27
>>>hi,
>>>thank you for reply,it works
>>>>
>>>>lnNumber = 1235.789
>>>>lcText = TRANSFORM(INT(lnNumber % 1 * 1000))
>>>>
>>>>>
>>
>>Are you sure you always have 3 digits after the point? If you have 2 or more than 3, you would not get the decimal only part, e.g. test with
>>
>>lnNumber = 344.8990034
>>
>>and with lnNumber = 23.44
>>
>For an undertermined number of decimal digits use
>
GETWORDNUM(TRANSFORM(lnnumber),2,'.')
>
>However, this yeilds an empty string (rather than 0) if there are no decimal digits
>
>
>
You can always add VAL() to it :)
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform