Ask Your Question

How can I get the datedif function to work in Calc? It throws #NAME? error now [closed]

asked 2018-05-19 14:16:18 +0200

floris v gravatar image

Trying to answer the question on the Dutch section here got me stuck with a weird problem: while datedif is listed in the online Help with full description of its syntaxis, it doesn't appear in the function assistant and it consistently throws a #NAME? error. Do I need to toggle some MS support setting in the install procedure or is this something hidden in the options? Happens on LO version (x64) and

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by floris v
close date 2018-05-19 22:08:07.907330


IF a function doesn't appear in the function assistant then it is either a user function or a function of another version. Help is a separate file so may contain inconsistencies depending on the installation process (example: may a newer help installed or an older help not uninstalled)

Xoristzatziki gravatar imageXoristzatziki ( 2018-05-20 08:48:56 +0200 )edit

3 Answers

Sort by » oldest newest most voted

answered 2018-05-19 22:07:30 +0200

floris v gravatar image

Solved after installing version (x64) Build ID: 9b0d9b32d5dcda91d2f1a96dc04c645c450872bf - no modifications were needed.

edit flag offensive delete link more

answered 2018-05-19 15:31:20 +0200

updated 2018-05-19 21:01:41 +0200

Please check DATEDIF syntax -

It throws #NAME? error if Interval parameter is missing. Interval is a string, accepted values are "d", "m", "y", "ym", "md" or "yd".

image description

edit flag offensive delete link more


I checked all of those before I posted this, read the specs three times over, how much can one do? ;=)

floris v gravatar imagefloris v ( 2018-05-19 16:35:42 +0200 )edit

Just installed clean version of LO on x86 Windows 7 machine without changing any defaults - DATEDIF is in the formula list. Screenshot added to answer. I can get #NAME? error when passing plain text as Date argument or when using Interval argument without double quotes. In your case seems formula itself is missing (or maybe have other local name?)

SM_Riga gravatar imageSM_Riga ( 2018-05-19 21:01:05 +0200 )edit

As usual the help isn't very useful as it doesn't make clear what is accepted as a 'Start date' or an 'End date'. Dates are by default integer numbers in Clac (option relevant). In this case also dates in a textual representation are allowed as my examples showed. However, the choice of acceptable formats will heavily depend on language options and (probably) on the language (locale) setting under 'Numbers' in Format Cell...'. It's this lack of clarity I call the function a monster for.

Lupp gravatar imageLupp ( 2018-05-19 21:14:14 +0200 )edit

Functions the working of which cannot be precisely explained in a concise way in a help text should be deprecated. That would apply to next to all, I am afraid, on the other hand. There were some decades now efficiently used to mess up things, and something like the third parameter of DATEDIF() does the rest.
My advice: Do not use this crazy function. Stick to the few we know for how to tell if something is a bug.

Lupp gravatar imageLupp ( 2018-05-19 21:19:14 +0200 )edit

answered 2018-05-19 15:31:29 +0200

Lupp gravatar image

updated 2018-05-19 15:34:46 +0200

For me the function is listed in the wizard and it works in V5.4.4 and in V6.0.3 as well.
Well, I regard this function as a monster nobody should use, and therefor I did never study ift the results it returns comply with its specification. Anyway I don't get an error message from (e.g.)


and the result of 11 returned in each of these cases is plausible.

edit flag offensive delete link more


Seea also the specification of the type DateParam and probably the specification of respective conversion reqirements.

Lupp gravatar imageLupp ( 2018-05-19 15:38:23 +0200 )edit

Question Tools

1 follower


Asked: 2018-05-19 14:16:18 +0200

Seen: 760 times

Last updated: May 19 '18