Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Loosing decimal places
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00225344
Message ID:
00225359
Views:
10
>I am writing a value like 1.47 into a file on the way into the file i am taking this value and doing a alltrim(str(round(a,2))) like so because it is a numeric feild going to a alpha once i write it to the file it works fine but it chops off everything to the right of the decimal i tried taking the alltrim off and no luck any ideas?

Hi James,

In addition to what Ian said, you can use TRANSFORM(a) to convert the type. However, trailing zeros will be removed. Optionally, you can add a format to preserve these.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform