In this video, you will learn how to calculate age in terms of years, months and days from date of birth.
To calculate this , we will use datedif function. Sounds strange, yes. When you type it date, excel will pop up all functions related to date but datedif function, you will not be able to see.
Datedif function has its origin from Lotus 1-2-3 and it is included in excel for compatibility purpose. Even the arguments need a manual entry.
Not only datedif function gathers momentum, but its unit code is also important.
1. Unit Code Result
"Y" ------ The number of complete years in the period
"m" ------ The number of complete months in the period
"d" ------ The number of days in the period
"md" ------ The month and years of the dates are ignored.
"ym" ------ The days and years of the dates are ignored.
"yd" ------ The years of the dates are ignored.
#Msexcel,#calcualteage #exceltipsandtricks #exceltutorials #ageinmonths #ageinyears #ageindays #datediffunction.
Apart from the unit code, we will nest in today function as well because we want to calculate the age as on today.
1. The formula to calculate the age in terms of years:
=datedif(startdate,today(),"y")
2. The formula to calcualte the age in terms of months:
=datedif(start_date,today(),"ym").
3. The formula to calcualte the age in terms of days :
=datedif(startdate,today(),"md").
Keep watching, keep learning.