The Excel function calculates the years between a start date and an end date.
The closest Calc function is YEARS which purports to do the same. However I could not get it to work using the definition as in the manual with dates like "25-12-2016".
However the example given in the YEARS function in the Calc wiki - found by using Help - does work. See
Documentation/How Tos/Calc: YEARS function
Code: Select all
=YEARS("2009-04-03"; "2011-11-17"; 0)
gives the value 2. Note the spaces, quotes, the date format used and the " 0 " which selects years where
If mode is 0, YEARS returns the number of whole years between startdate and enddate, day/month to day/month.
If mode is 1, YEARS identifies the year that startdate and enddate each lie in, and returns the difference between those years. In other words it returns YEAR(enddate) - YEAR(startdate)
You will appreciate the necessity for understanding
exactly what the Excel and Calc functions do.
Showing that a problem has been solved helps others searching so, if your problem is now solved, please view your
first post in this thread and click the Edit button (top right in the post) and add [Solved] in front of the subject.