The age( function calculates a person’s current age (in years) from their birthdate.
Parameters
This function has one parameter:birthdate – The person’s date of birth (see the date( function).
Description
This function calculates a person’s current age (in years) from their birthdate. It correctly accounts for leap years.
age(date("jan 7, 1957")) ☞ 56
age(date("June 4, 2011")) ☞ 4
Note: This function is equivalent to:
yearvalue(today()) - yearvalue(birthdate) - ?(monthvalue(birthdate) > monthvalue(today()) or
monthvalue(birthdate)=monthvalue(today()) and dayvalue(birthdate) > dayvalue(today()),1,0)
See Also
History
Version | Status | Notes |
10.0 | No Change | Carried over from Panorama 6.0. |