>I have the date of birth for a client.
>
>I need a function that tells me how old the client was on a certain date.
>
>For example, if the dob was 01/01/1970, how old was the client on 01/10/1985?
>
>Does anyone know of a way of doing this in VFP?
>
>Thanks
>Kev
This is a quick example of what I use.
ThisForm.lblage.caption = ovars.agecalc(player.dob)
***********
*** AgeCalc Method
Parameter lzddob
DO CASE
CASE VarType(lzddob)#[D]
RETURN 0
CASE EMPTY(lzddob)
RETURN 0
OtherWise
FOR i = 1 to 99999
IF DATE()<= GOMONTH(lzddob,i*12)
Exit
EndIF
EndFor
RETURN i
EndCase
Fred Lauckner
You know, it works on my computer. I don't know what your problem is.
.Net aint so bad.