different date

Asked by suriani

In EXCEL, I use this formula to find different date in cell A1 and B1:
=DATEDIF(A1;B1;"y") & "year " & DATEDIF(A1;B1;"ym") & " month " & DATEDIF(A1;B1;"md") & " day"

but it don't work in open office 2.2. How to solve this problem?

THX
suriani

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu openoffice.org Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
GercoKees (gercokees) said :
#1

I do not know a feature like datedif in OOo. You might want to request for an enhanchement here:
http://qa.openoffice.org/issue_handling/pre_submission.html

as a workaround try:

    a b
1 20-08-07 =a1+455
2 nr of years: =INT((B1-A1)/365,25)
3 nr of month: =INT(((B1-A1)-INT((B1-A1)/365,25)*365,25)/(365,25/12))
4 nr of days: =B1-EDATE(A1;INT((B1-A1)/365,25)*12+INT(((B1-A1)-INT((B1-A1)/365,25)*365,25)/(365,25/12)))

(365,25 is the average number of days in a year and takes leap-years into account....)

Can you help with this problem?

Provide an answer of your own, or ask suriani for more information if necessary.

To post a message you must log in.