Calculate Age from Date of Birth

From SmartWiki
Revision as of 11:04, 3 June 2009 by Cameron (talk | contribs)

Jump to: navigation, search

There is a system function called calage which can be used to calculate a current age when given the Date of Birth:


To display a current age you should create a Calculated Value Custom Field with the following expression:

calage([date of birth])
where date of birth is the name of the field that contains the date. It must be present and visible on the current page for this function to work.


Note: the calage function actually calculates the number of full years between the current date and the date included in the function.