Pages

Search This Blog

Wednesday, March 23, 2016

Calculate Age or Working-period in a Format YY Years, MM Months, and DD Days.

In this posting, we will discuss how to calculate the age or working period with Excel in the format "YY Year, MM month, DD Day". So the output produced eg "20 Years, 6 Months, 12 Days."

Function DATEDIF
The main concept for calculating age or age working with Excel is comparing two dates, namely the date of birth or date of the first day of work with the current date. Excel functions or formulas to calculate the age or the age of the work that is DATEDIF (read: date dif) number of years, months and days between two dates is to use DATEDIF ().

Syntax:
DATEDIF (start_date, end_date, unit)
  • start_date is the earliest date in this case is the date of birth or date First Day of Work
  • end_date in this case, end date is the date that we can now replace with TODAY () or NOW ()
  • unit is the type of information required if the unit in the year (Y), month (M), day (D), Month in the same year (YM), or day of the same month (MD).

In this example, date of birth or date of the first day of work can be kept constant or fixed, while the Current Date or Date of First Working Day can be made relative to the function TODAY () or NOW (). The unit used for this purpose is Y Year YM MD Month and Day.

Excel formula to calculate the age or working-period in cell C6 is as follows:
=DATEDIF(B2,NOW(),"Y")&" years, "&DATEDIF(B2,NOW(),"YM")&" months, "&DATEDIF(B2,NOW(),"MD")&" days."

Results:

No comments:

Post a Comment