Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strtran() / Stuff() / Padr() ???
Message
From
04/08/1999 10:13:38
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, United Kingdom
 
 
To
04/08/1999 09:53:01
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordan
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00249697
Message ID:
00249721
Views:
32
>Input="###,###,###.##"
>or
>Input="##,###.####"
>
>What is the best way to replace # Signs after . with 0 ??
>
>(Output="###,###,###.00"
>or
>Output="##,###.0000"
>
>
>TIA

I don't know about the best, but try

lcStr = "###,###,###.##"
? LEFT(lcStr,RAT(".", lcStr)) + REPLICATE("0", Len(lcStr) - RAT(".", lcStr))
Regards
Mark

Microsoft VFP MCP
Menulib - OO Menus for VFP www.hidb.com/menulib
Previous
Reply
Map
View

Click here to load this message in the networking platform