While working on Excel, Sometimes you need to calculate the number of Days, Months and Years between the two given dates.
To calculate the number of Days, Months and Years between the two given dates, we will use INT and MOD function in Excel 2016.
INT function returns the Integer part of the number.
MOD function returns the remainder of the number after dividing it with the divisor
Let’s get this by an example shown below.
We need to find the years, month and days between the two given dates in A1 and A2 cell.
Write the formula in A3 cell to get the years between these two dates.
We can see the number of years in the A3 cell.
Now write the formula in A4 to get the months
Use the Formula in A5 cell to get the days between the two dates.
As we know there are 12 months in a year and an average of 365.25 days in 4-year interval.
Here INT function returns the Integer part of the mathematical formulation part.
Here as you can see you get the number of Days, Months and Years between the two given dates.
Previously in Excel 2010 and Excel 2013, MS used to provide a date function named DATEDIF. It was found that it had some errors and was prone to give wrong outputs. This is why in Excel 2016 it is not promoted. But the function is still useful to calculate age. When you type this formula, no help or suggestion will be shown. You have to type it whole…
“Y” will return the difference of years. At the place “Y” we can also write “M” or “D”.
As you must have guessed that “M” will return the difference in Months and “D” will return difference of Days.
These basic formulas and its uses can improve your time and efficiency using MS Excel 2016. Hope you understood how to count the number of days between the two given dates. You can perform these tasks in Excel 2013 and 2010. Please share your views on this topic below in the comment box. We will help you.
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.