Forum Discussion

Lisainnj's avatar
Lisainnj
Copper Contributor
May 01, 2022
Solved

How to calculate time between two dates. What replaces datedif?

I need to calculate age in years between two dates. Help says use datedif, but the function does not appear in excel! I know there is a way to create a function that does this, but I haven't the algebraic ability.

Can someone help me with a formula?

    • Lisainnj's avatar
      Lisainnj
      Copper Contributor
      no tooltip - and when typed, no calculation. thank you for the alternative to use.
  • Lisainnj Which version of Excel are you using, on which platform? It is available in most versions, but not well documented in some of them.

    Let's say you have dates in A2 and B2. Try entering =DATEDIF(A2,B2,"y") in another cell.

    • Gary_Devine's avatar
      Gary_Devine
      Copper Contributor
      This works -- if you follow exactly the correct syntax!
    • Lisainnj's avatar
      Lisainnj
      Copper Contributor
      I'm use windows on a remote cloud service I'm subscribed to office 365
      the datedif function does not show in excel and will not compute a value - even when i change cells and hand enter the equation example. i need another option to the no longer available function

Resources