To calculate the durations of date intervals in Excel there is a function RAZNDAT, in the English version – DATEDIF.
The nuance is that you will not find this function in the list of the Function Wizard by clicking the button fx – it is an undocumented feature of Excel. More precisely, you can find a description of this function and its arguments only in the full version of the English help, since in fact it is left for compatibility with older versions of Excel and Lotus 1-2-3. However, despite the fact that this function cannot be inserted in the standard way through the window Insert – Function (Insert — Function), you can manually enter it into a cell from the keyboard – and it will work!
The function syntax is as follows:
=RAZNDAT(Start_date; Final date; Method_of_measurement)
With the first two arguments, everything is more or less clear – these are cells with start and end dates. And the most interesting argument, of course, is the last one – it determines exactly how and in what units the interval between the start and end dates will be measured. This parameter can take the following values:
“and” | full year difference |
“M” | in full months |
“D” | in full days |
«yd» | difference in days since the beginning of the year, excluding years |
“Md” | difference in days excluding months and years |
«in» | difference in full months excluding years |
For example:
Those. if you wish, calculate and display, for example, your experience in the form of “3 years 4 months. 12 days”, you must enter the following formula in the cell:
u1d RAZDAT (A2; A1; “y”)&” y. “& RAZDAT (A2; A1; “ym”) & ” month. “&RAZDAT(A2;AXNUMX;”md”)&” days”
where A1 is the cell with the date of entry to work, A2 is the date of dismissal.
or in the English version of Excel:
=DATEDIF(A1;A2;»y»)&» y. «&DATEDIF(A1;A2;»ym»)&» m. «&DATEDIF(A1;A2;»md»)&» d.»
- How to make a drop-down calendar for quickly entering any date with the mouse in any cell.
- How Excel works with dates
- How to make the current date automatically entered in a cell.
- How to find out if two date intervals overlap and by how many days