>Is there any pre-defined function in VFP that allows the truncation of a decimal. For example if I want to get 0.465 from 0.4655? Any form of help is appreciated.
>
The ROUND() function is one approach, but .4655 will round up with the default behavior.
You could create a function as a UDF():
FUNCTION TruncateDecimal
LPARAMETER nNumberToTrunc, nPrecisionToRightOfDecimal
RETURN INT(nNumberToTrunc * (10^nPrecisionToRightOfDecimal)) / (10^nPrecisionToRightOfDecimal)