Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert numeric to char
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00649247
Message ID:
00649399
Views:
8
>If I had a numeric value of 1.4476, how can I convert this to character and make it look exactly like
>numeric value ("1.4476"). whenever I do following I get just 1 character rounded up or down:
>
ct = 1.4476
x = str(ct)
?x &&shows "1"
>I need it to show "1.4476"

Besides the TRANSFORM() suggested elsewhere, you could use

x = LTRIM(STR(ct, 10, 4))
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Previous
Reply
Map
View

Click here to load this message in the networking platform