|
|
Home > User Issues > Contacts > Calculate age This code for an Outlook
formula field on a Contact item or in a Contacts folder gives you
the "real age" for everyone except those fortunate few
born on Feb. 29 in a leap year:
IIf([Birthday]<>"None",DateDiff("yyyy",[Birthday],Date())-IIf(DateDiff("d",
CDate(Month([Birthday]) & "/" & Day([Birthday])
& "/" & Year(Date())),Date())<0,1,0),"")
DateDiff by itself is inadequate, because it will
round up if the birthday
has not yet occurred during the current year. |