asked on
ASKER
Visual FoxPro (VFP), and its predecessor FoxPro, is a data-centric, object-oriented, procedural, database programming language and IDE from Microsoft last released in 2007 that still has some active use due to its low cost of deployment and fairly rapid development. In 2008, Microsoft released a set of add-ons for VFP's xBase components to allow interoperability with various Microsoft technologies. It allows data processing against its native file-based data tables or database servers such as SQL Server.
TRUSTED BY
If you look in your VFP Help for that funcion you will see it described in detail.
Another VFP function which may work for you is the TRANSFORM() function.
Again look into your VFP Help for more explanation
Lastly if you want to Pad out the string value to a fixed number of digits you will likely want to use the PADL() or PADR() function (see your VFP Help)
Note that since you seem to want to change the numeric value (example: from -4.99 to 499) I'd recommend doing that (maybe in a temporary cursor) PRIOR to converting the value to a String.
Perhaps something like:
nTestValue = -4.99
nNewTestValue = ((-1 * nTestValue) * 100)
cNewTestValue = ALLTRIM(STR(nNewTestValue)
cNewTestValue = PADL(cNewTestValue,10,'0')
If you have questions about any individual line, look up the function in your VFP Help.
Good Luck