Thread: Age Calculation
View Single Post
  #5 (permalink)  
Old May 10th, 2006, 10:56
iZone iZone is offline
Up'n'Coming Member
Join Date: Nov 2005
Location: England
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Age Calculation

Ive done some more digging and something like

age=yearCurrent-yearOfBirth;
if(monthOfBirth-monthCurrent<0)age--;
else if(monthOfBirth-monthCurrent==0)
if(dayOfBirth-dayCurrent<0)age--;
Reply With Quote