> Hello Everyone

>

> I want to convert 15.398 to character format

>

> - The number of decimal places is not Known it could be 3,4,5 or more

>

> - STR(15.398,12,5) Result is 15.39800 is not acceptable I need the result as 15.398

>

> - STR(15.390,12,5) Result is 15.39000 is not acceptable I need the result as 15.390

>

> How can this be carried out?

>

> Regards

What you need, colleague Rajesh, is the VFP's TRANSFORM() function.

Unfortunately, it was not yet introduced in VFP6.

However, there are ways to truncate the trailing zeros (this is what you are asking for, as I understand).

Let me ask you this: do you always need 3 decimal digits in that resulting string? If so - Martin Krivka has already answered your question; if not - could you be more specific?

Regards,

Ilya