Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Applications / Excel / July 2005



Tip: Looking for answers? Try searching our database.

Excel function for Calculation of age

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jimmy Joseph - 28 Jul 2005 09:08 GMT
I wanted to calculate age of a candidate in Year/Month/Day format. What
is function to be used in Excel to get the result in Year/Month/Day
format. I have the date of birth of the candidate and wanted to have
the result for a given date.

eg. Date of birth of candidate = 20.05.1976

what will be the age of the candidate on 20.10.2005 in Year/Month/day
format
Bob Greenblatt - 28 Jul 2005 12:59 GMT
You'll have to subtract each component separately. For example,
=year(desired date)-year(birth date). Then do the same for month and day.
Then you'll have to reduce the year by 1 if the birth month and day is
"after" the desired date.

On 7/28/05 4:08 AM, in article
Xns96A18AD383644jimmyjosephinboschco@client.loc.cc.bosch.com, "Jimmy Joseph"
<jimmy.joseph@in.bosch.com> wrote:

> I wanted to calculate age of a candidate in Year/Month/Day format. What
> is function to be used in Excel to get the result in Year/Month/Day
[quoted text clipped - 5 lines]
> what will be the age of the candidate on 20.10.2005 in Year/Month/day
> format

Signature

Bob Greenblatt [MVP], Macintosh
bobgreenblattATmsnDOTcom

JE McGimpsey - 28 Jul 2005 13:53 GMT
In article
<Xns96A18AD383644jimmyjosephinboschco@client.loc.cc.bosch.com>,

> I wanted to calculate age of a candidate in Year/Month/Day format. What
> is function to be used in Excel to get the result in Year/Month/Day
[quoted text clipped - 5 lines]
> what will be the age of the candidate on 20.10.2005 in Year/Month/day
> format

Another way you could do this is with DateDif (see

   http://cpearson.com/excel/datedif.htm

for documentation). For instance, say the birth date is in A1 and the
date of interest is in B1:

   =DATEDIF(A1,B1,"y") & "/" & DATEDIF(A1,B1,"m") & "/" &
DATEDIF(A1,B1,"md")

However, note that "month" is a tricky concept. For instance how many
months and days is it between 31.1.2005 and 2.3.2005 (30 days)?

The formula above will say  0/1/-1. Since the first date is in January
and January has 31 days, it calculates 1 thirty-one-day month (3.3.2005)
with -1 day.

There are other results that make sense, but nothing can be made
consistent since the concept of month is so variable. For instance, if
you say one month after 31.1.2005 is 28.2.2005, what should be the
result for one month after 29.1.2005?

Any algorithm you devise will have to deal with this type of anomaly.

OTOH, you could use years and days:

   =DATEDIF(A1,B1,"y") & "/" & DATEDIF(A1,B1,"yd")

which is perfectly self-consistent for all but leap days (using days
alone would be absolutely consistent).
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.