Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Interpret a formula

Status
Not open for further replies.

austin22

Technical User
Aug 6, 2007
66
US
Can someone interpret this formula?

Code:
NumberVar DoBVar := IIF((100 * MONTH(CURRENTDATE) + DAY(CURRENTDATE)) < (100 * MONTH({Case_party_PHYSICAL_TABLE.CP_DOB}) + DAY({Case_party_PHYSICAL_TABLE.CP_DOB})), 1, 0);
NumberVar YrsVar := DATEDIFF("yyyy",{Case_party_PHYSICAL_TABLE.CP_DOB},CURRENTDATE) - DobVar;
 
This is an age formula. The first variable determines whether the date of birth (month/day) is earlier than the current date (month/day) and if so, assigns a 1 that is then used to adjust the straight difference in years between the currentdate and the date of birth--to ensure an accurage age.

-LB
 
Thank you so much...it make sense to me now.
Have a great day!

austin22
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top