Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Formating a field - Number to money
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00498037
Message ID:
00498086
Vues:
11
Another way is to set the Format and InputMask properties of the display mechanism (Textbox for example).

THISFORM.Text1.InputMask = "999,999,999.99"
THISFORM.Text1.Format = "$"

>Thanks Larry .... But am I the only one who finds this type of code a bit strange to have to work with.
>
>it may be me, but I would think that currancy formating codes would do this. oh well. whatever works.
>
>Bob
>
>>>I have tried a few options, and just have not found the right set of formatting commands.
>>>here is what I am trying to do.
>>>m_value = 789456.1000000
>>>Display_value should look like $789,456.10
>>>
>>>also 123.0000000 should look like $123.00 not $,123.00
>>>
>>>so I think I asking for the format code
>>>
>>>thanks
>>>Bob Lee
>>
>>Bob,
>>Try the following:
>>
>>chrtran(transform(789456.1000000,"$999,999,999.00")," ","")
>>chrtran(transform(123.0000000,"$999,999,999.00")," ","")
>>
>>HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform