Select Page

## Subtract two dates in excel to get years and months

The formula returns the number of years in decimal values.This is equal to 12 - (10 - 2).It was found that it had some errors and was prone to give wrong outputs.Easy and very straight-forward.Check out our tutorial if you want to try it!In one cell, type a full subtract two dates in excel to get years and months start date/time.The third column is the result.How to Add or Subtract Months from Dates in Excel.It was found that it had some errors and was prone to give wrong outputs.Note: fill in "ym" for the third argument to ignore years and get the number of months between two dates.In this example, the two dates used are 1/1/2014 and 1/30/2014.Getting days by DATEDIF along with Year/Months.Age formula for Year/Month and Days:.We need to use the following formula in cell E2 and drag the fill handle down; =DATEDIF(B2,C2,"M") Figure 2.Note: To subtract 6 years from the date, please apply this formula =DATE(YEAR(A2)-6,MONTH(A2),DAY(A2)).Note: the DATE function accepts three arguments: year, month and day.As you can see, it returns the number of Years between the two dates.To get months, use =DATEDIF(A2,A3,"ym").Check out our tutorial if you want to try subtract two dates in excel to get years and months it!It only gives the number of days between two dates.Another handy way to work with dates in your Excel sheets is to calculate the number of days between two dates.=DATE(YEAR(B2)+C2,MONTH(B2),DAY(B2)) Advertisement.The post also has a link to instructions for calculating the days between two dates.Using the DATEDIF Function to Calculate Months Between Two Dates.Now if you want to calculate the length of service of a person in years, months and days you can use the DATEDIF function So we passed 4 months.=DATE(YEAR(B2)+C2,MONTH(B2),DAY(B2)) Advertisement.