>>>What is the easiest way to determine if a number has two decimal places and if not, append it so it will have two?
>>
>>nNumber = (nNumber-int(nNumber))*100
>>if nNumber > 9
>> return .t.
>>endif
>>
>>Cetin
>
>Snip.... (But I donno what means!)
>Seem wrong. if nNumber is 5.01 !!
>or typing error.
>
>[if nNumber > 0 ]....
>I perfer to use [if Empty(nNumber)]
>
>Well, I think it would be:
>
>Alltrim(Str(nNumber, 10,2))
>
>Make to 2 decimal string without test because cannot make 5.00 as requiry!!
>If you want to make 5.001 to 5.01, it would be:
>
>Alltrim(Str(Ceiling(100*nNumber)/100, 10,2))
>
>It will be very useful on report and label printing!! ^_^;
Thanks Justok,
Seems I got the question wrong. This one might be more true :
return round(nNumber,2)
Cetin