SOLVED

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

%3CLINGO-SUB%20id%3D%22lingo-sub-3299782%22%20slang%3D%22en-US%22%3EHow%20to%20calculate%20time%20between%20two%20dates.%20What%20replaces%20datedif%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3299782%22%20slang%3D%22en-US%22%3E%3CP%3EI%20need%20to%20calculate%20age%20in%20years%20between%20two%20dates.%20Help%20says%20use%20datedif%2C%20but%20the%20function%20does%20not%20appear%20in%20excel!%20I%20know%20there%20is%20a%20way%20to%20create%20a%20function%20that%20does%20this%2C%20but%20I%20haven't%20the%20algebraic%20ability.%3C%2FP%3E%3CP%3ECan%20someone%20help%20me%20with%20a%20formula%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3299782%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3299816%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20calculate%20time%20between%20two%20dates.%20What%20replaces%20datedif%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3299816%22%20slang%3D%22en-US%22%3Eno%20tooltip%20-%20and%20when%20typed%2C%20no%20calculation.%20thank%20you%20for%20the%20alternative%20to%20use.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3299815%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20calculate%20time%20between%20two%20dates.%20What%20replaces%20datedif%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3299815%22%20slang%3D%22en-US%22%3EI'm%20use%20windows%20on%20a%20remote%20cloud%20service%20I'm%20subscribed%20to%20office%20365%3CBR%20%2F%3Ethe%20datedif%20function%20does%20not%20show%20in%20excel%20and%20will%20not%20compute%20a%20value%20-%20even%20when%20i%20change%20cells%20and%20hand%20enter%20the%20equation%20example.%20i%20need%20another%20option%20to%20the%20no%20longer%20available%20function%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3299796%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20calculate%20time%20between%20two%20dates.%20What%20replaces%20datedif%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3299796%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1378175%22%20target%3D%22_blank%22%3E%40Lisainnj%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20addition%2C%20there%20is%20no%20tooltip%20for%20DATEDIF().%20You%20shall%20type%20it%20on%20your%20own%2C%20Excel%20shows%20nothing%20while%20you%20are%20entering%20function.%3C%2FP%3E%0A%3CP%3EAlternatively%20you%20may%20use%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Foffice%2Fyearfrac-function-3844141e-c76d-4143-82b6-208454ddc6a8%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EYEARFRAC%20function%20(microsoft.com)%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3299783%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20calculate%20time%20between%20two%20dates.%20What%20replaces%20datedif%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3299783%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1378175%22%20target%3D%22_blank%22%3E%40Lisainnj%3C%2FA%3E%20Which%20version%20of%20Excel%20are%20you%20using%2C%20on%20which%20platform%3F%20It%20is%20available%20in%20most%20versions%2C%20but%20not%20well%20documented%20in%20some%20of%20them.%3C%2FP%3E%0A%3CP%3ELet's%20say%20you%20have%20dates%20in%20A2%20and%20B2.%20Try%20entering%20%3DDATEDIF(A2%2CB2%2C%22y%22)%20in%20another%20cell.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

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?

4 Replies

@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.

best response confirmed by Lisainnj (New Contributor)
Solution

@Lisainnj 

In addition, there is no tooltip for DATEDIF(). You shall type it on your own, Excel shows nothing while you are entering function.

Alternatively you may use YEARFRAC function (microsoft.com)

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
no tooltip - and when typed, no calculation. thank you for the alternative to use.