Transcript
The DATEDIF function returns the difference between two dates given as the number of years or months or days. Interestingly, about the DATEDIF function is that as you type it in, Excel doesn't recognize it. It's actually a hangover from Excel 2000. It's fully explained there, but it's not explained in any Excel version since, but it still works perfectly well.
So I type it in, = datedif. I open brackets, and I now need to put in my start date. My start date is going to be date of birth and my end date is going to be today's date. What I then need to do is I now need to put in the format that I want the answer to be returned in. If I want it returned in the number of whole years, I'll type a Y, if I want the number of months, an M, if I want number of days, a D. If I want the number of months, but ignoring the number of years, so assuming if I was going from January, 1900 to December, 2000, it would just count the number of months between January and December. It would ignore the years. It would count that that was 11 months between the two. For that kind of thing, you then need to put in two letters. So for instance, if you want months but not the years, you'd put YM. If you wanted the days, but not the years, you'd put YD. So let's put a Y so that I can count the number of years old that somebody is, and that gives me 47. Alternatively, I could have changed the Y to an M, 564 months old, or alternatively, the number of days old someone is, 17,191.