At 09:06 19/01/2009 +0100, Thomas Calis wrote:
I have been looking for a feature in Calc which calculates
automatically someone's age after giving the person's birthday. Is
that possible?
You mean their age in the conventional sense of an integral number of
completed years - right? Try:
=INT(YEARFRAC(A1;NOW();1))
- where the date of birth is in A1.
The NOW() function returns the current date (and time). The
YEARFRAC() function returns the difference - in years and fractions
of a year - between the two dates. The result for the date of birth
and the current date is the person's actual age, including fractions
of a year. The INT() function rounds the result down to the whole
number below.
The third parameter of the YEARFRAC() function is set to 1 in order
to make it calculate with real dates and not according to some
standardised idea of the lengths of years and months. See the help
text for this function for details.
I trust this helps.
Brian Barker
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]