Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Age calculations
Message
From
22/01/1999 12:24:53
 
 
To
22/01/1999 12:03:32
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00179005
Message ID:
00179028
Views:
24
LPARAMETERS tdBirthDate

lnAge = Year(Date()) - Year(tdBirthDate)

DO CASE
CASE Month(Date()) = Month(tdBirthDate)
   lnAge = lnAge + IIF(Day(Date()) < Day(tdBirthDate), 0, 1)
CASE Month(Date()) > Month(tdBirthDate)
   lnAge = lnAge + 1
ENDCASE

RETURN lnAge
HTH

>i need the code for calculating the age as follows:
>i habe a field where we input the date.
>i need to calculate the age on another field based on the current date
Previous
Reply
Map
View

Click here to load this message in the networking platform