How to calculate age in years, months, days in openoffice. I got the years using the formula
=YEARS(VALUE(I3);NOW();0)
but having difficulties putting it all together with the months, and days preferably in this format: 15Y, 5M, 5D. Thanks all.
[Solved] Calculate age in years, months, days
[Solved] Calculate age in years, months, days
Last edited by MrProgrammer on Mon Mar 30, 2026 6:15 pm, edited 1 time in total.
Reason: Tagged ✓ [Solved]
Reason: Tagged ✓ [Solved]
OpenOffice 4.1.7 on Windows
Re: How to calculate age in years, months, days
Substract the date of birth from the value NOW(). Then format the result as you want or extract the Years, Months, Days.
Tibor Kovacs, Hungary; LO7.5.8/25.8.5.2 /Win7-10-11 x64Prof.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: How to calculate age in years, months, days
I'm more of a visual learner, so I had no luck from the reading instructions, but I did try it and it did not work for me still.
"Substract the date of birth from the value NOW()." and section D, but to no avail.
=YEARS(VALUE(G3);NOW();0)&=MONTHS(VALUE(G3);();0)& (it did not work)
So need additional assistance. See attached. Thanks again.
"Substract the date of birth from the value NOW()." and section D, but to no avail.
=YEARS(VALUE(G3);NOW();0)&=MONTHS(VALUE(G3);();0)& (it did not work)
So need additional assistance. See attached. Thanks again.
- Attachments
-
- Spreadsheet.ods
- (12.37 KiB) Downloaded 141 times
OpenOffice 4.1.7 on Windows
Re: How to calculate age in years, months, days
Here are another two approaches:
I am using the function TODAY() instead of the NOW(). (The NOW() will refresh in every seconds, when you enter new data.)
The result of the substraction will not be exact, because the difference will "hide" the leap years. You can not detect - based on the diference - how many leap years was in the life of the actual person.
I think, the another approach/solution works better.
I am using the function TODAY() instead of the NOW(). (The NOW() will refresh in every seconds, when you enter new data.)
The result of the substraction will not be exact, because the difference will "hide" the leap years. You can not detect - based on the diference - how many leap years was in the life of the actual person.
I think, the another approach/solution works better.
Tibor Kovacs, Hungary; LO7.5.8/25.8.5.2 /Win7-10-11 x64Prof.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.