>>>>I'm trying to find a function in VFP8 that will return the decimal part of a number. eg 89.55 Should return 55
>>>
>>>
>>>Hi Luc,
>>>
>>>Would this do it for you?
>>>
>>>x=89.55
>>>
>>>? MOD(x,INT(x))
>>>
>>>Ken
>>
>>Another way to do the same :)
>>
>>x=89.55
>>? x%1
>>
>Kool!
To get only the decimal part without "0.", you have to wrap it in a less kool way :)
? RIGHT(STR(x%1,4,2),2)
? VAL(RIGHT(STR(x%1,4,2),2))
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca