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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculating age

Status
Not open for further replies.

kashush

Programmer
May 2, 2003
38
0
0
US
How would you calculate an age. I want to decide logic based on whether someone is 65 or older. This is not working.

IF(DATETONUMBER( CURRENTDATE( ) ) - DATETONUMBER( TEXTTODATE( birthdate) ) >= DATETONUMBER( TEXTTODATE( "19300101" ) ), "Y", "N" ) ) )))

Please advise. Thanks.
 
Kahush,

You are trying to compare age vs year. It should be something this:

If (CURRENT DATE) - (BIRTHDATE >= 65
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top