On Thursday, February 21, 2008 9:30 AM Mike wrote:
Maybe
=DATEDIF(A1,A2,"y")&" y "&DATEDIF(A1,A2,"ym")&" m "&DATEDIF(A1,A2,"md")&" d"
Where a1= DOB
a2 = DOD
Mike H
:
30:02 -0800, Mike H <
[email protected]>
wrote:
Since this is in a hospital, and the result probably going on some kind of
legal document, I think you need to have the legal definition of "age" for this
purpose.
Some odd results arise with that formula when it is used for this kind of
determination:
DOB: 31 Jan 1943
DOD: 01 Mar 2008
Your Formula: 65 y 1 m -1 d
--ron
On Thursday, February 21, 2008 12:02 PM Rick Rothstein \(MVP - VB\) wrote:
I've always thought measuring a time span using years, months and days is
somewhat useless as the months part is not a very definitive increment. The
number of days spanned by some number of months differs depending onthe
months being spanned. Hell, even years can be somewhat problematic give the
occurrence of leap years within time spans; but, when used by itselfas a
"rough" indicator of time span, this if fine; however, the accuracy implied
by specifying a time span in years, months and days has always bothered me
(way more so than simply specifying years and days, even though I recognize
the inaccuracy introduced by the leap years here).
Rick
On Thursday, February 21, 2008 12:49 PM Niek Otten wrote:
<way more so than simply specifying years and days,>
Indeed. Financial (and actuarial, my area of interest) systems often use this. But because product specifications often *do* refer
to months, the 360-day system is somewhat popular in those groups. Not that it's perfect!
It assumes a 360-day year, consisting of 12 30-day months.
As you can imagine, the remaining 5 or 6 days are subject to lots of different interpretations, but AFAIK they boil down to 2
systems; NASD or European (see HELP for DAYS360).
If only customers would specify what "number of months difference" means (to them).....
--
Kind regards,
Niek Otten
Microsoft MVP - Excel
02:14 -0500, "Rick Rothstein \(MVP - VB\)"
In general I agree with you, but there are certain legal ramifications in
certain areas, and, if clarified, can allow one to express a time span even
with the inclusion of "months".
For example, some kinds of aviation certifications are defined in terms of
"calendar months". The meaning is clear (if you know the definition), but not
something that can be computed (easily) using DATEDIF.
--ron
[A1] = date of birth;
[B1] = Date of death;
=DATEDIF(A1,B1,"y")&"y,"&DATEDIF(A1,B1,"ym")&"m,"&DATEDIF(A1,B1,"md")&"d"
Should work OK
Regards
Zanny
On Sunday, February 27, 2011 6:48 PM Susie Toews wrote:
=YEAR(DATE(YEAR(D8)-YEAR(B8),MONTH(D8)-MONTH(B8)+1,DAY(D8)-DAY(B8)+1))-1900&" Years "&IF(MONTH(DATE(YEAR(D8)-YEAR(B8),MONTH(D8)-MONTH(B8)+1,DAY(D8)-DAY(B8)+1))-1=0,"",MONTH(DATE(YEAR(D8)-YEAR(B8),MONTH(D8)-MONTH(B8)+1,DAY(D8)-DAY(B8)+1))-1&" Months ")&IF(DAY(DATE(YEAR(D8)-YEAR(B8),MONTH(D8)-MONTH(B8)+1,DAY(D8)-DAY(B8)+1))-1=0,"",DAY(DATE(YEAR(D8)-YEAR(B8),MONTH(D8)-MONTH(B8)+1,DAY(D8)-DAY(B8)+1))-1&" Days")
Submitted via EggHeadCafe
SQL Server Table Valued Parameters / Types - Multiple Row Inserts
http://www.eggheadcafe.com/tutorials/aspnet/1b4677b6-3be6-4b68-897f-e...