Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting numbers to letters
Message
From
17/07/2000 11:17:39
Jonathan Cochran
Alion Science and Technology
Maryland, United States
 
 
To
17/07/2000 00:03:02
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00393097
Message ID:
00393315
Views:
15
How about:
cents = (amount-int(amount)) * 100
or
cents = alltrim(str( (amount-int(amount)) * 100 ))

>Hi all...
>I'm trying to write some code that converts a currency amount to letters for invoicing (in Spanish) I take an amount from a field and the first thing to do is isolate the cents. I do this as:
>cents=amount-int(amount). Problem is I got a number like 0.45.
>How to get rid of the 0. and convert this to a string to be used in the final expression?
>TIA.
>Ulises.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform