![在 OpenOffice 中计算天/月/年的年龄](https://linux22.com/image/1316719/%E5%9C%A8%20OpenOffice%20%E4%B8%AD%E8%AE%A1%E7%AE%97%E5%A4%A9%2F%E6%9C%88%2F%E5%B9%B4%E7%9A%84%E5%B9%B4%E9%BE%84.png)
需要在 OpenOffice 中查找以天 - 月 - 年为单位的年龄。
Microsoft Excel 中有这个功能DATEDIF()
。你可以使用它来计算两个日期之间的天数/月数/年数之差。
Age Calculation
You can calculate a persons age based on their birthday and todays date.
The calculation uses the DATEDIF() function.
The DATEDIF() is not documented in Excel 5, 7 or 97, but it is in 2000.
(Makes you wonder what else Microsoft forgot to tell us!)
Birth date : 01-Jan-60
Years lived : 52 =DATEDIF(C8,TODAY(),"y")
and the months : 4 =DATEDIF(C8,TODAY(),"ym")
and the days : 30 =DATEDIF(C8,TODAY(),"md")
可以用下面的公式来计算,但是计算月份比较麻烦。
Another way to calculate age
This method gives you an age which may potentially have decimal places representing the months.
If the age is 20.5, the .5 represents 6 months.
Birth date : 01-Jan-60
Age is : 52.41 =(TODAY()-C23)/365.25