DateDiff("yyyy", [DOB], #1/1/2006#) - IIf(Format([DOB], "mmdd") > "0101", 1, 0)
-- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please)
"jdub via AccessMonster.com" <u22625[ at ]uwe> wrote in message news:637360255fd56[ at ]uwe...
[Quoted Text] > Hey group!! > > I need some help. I've been tasked to calculate the age of players from > 1/1/2006. I created a field in my registration table called "enddate" and > gave it a default value of "1/1/2006." During registration, the user > enters > the Date of Birth and it calculates the players league age. The formula > I'm > using is: =Int(DateDiff("m",[DOB],[EndDate])/12). > > The problem I'm having is that it works for every player except the ones > in > January. What I would like to do is expand this to include the day as > well. > Presently, the formula only has "m" for month. Please help. I'm a newbie > and happened to stumble across the above formula online but can't remember > where. > > thanks, > > Jdub > > -- > Message posted via AccessMonster.com > http://www.accessmonster.com/Uwe/Forums.aspx/access-gettingstarted/200607/1
|