Prev: Calculating age
Next: Data quality software package
From: Deb_B on 24 Jan 2010 21:28 I am trying to get my database for my field hockey team to figure the players age by entering their brithdate. I can get it to round to the nearest tenth but if I tell it no decimals, it rounds to the nearest whole number. I just want it to drop the decimal places. If the player is 4 days shy of their 13th birthday, they are still 12. Can anyone help me with this? Thanks for your help, Deb
From: John W. Vinson on 24 Jan 2010 21:58 On Mon, 25 Jan 2010 02:28:32 GMT, "Deb_B" <u57741(a)uwe> wrote: >I am trying to get my database for my field hockey team to figure the players >age by entering their brithdate. I can get it to round to the nearest tenth >but if I tell it no decimals, it rounds to the nearest whole number. I just >want it to drop the decimal places. If the player is 4 days shy of their 13th >birthday, they are still 12. Can anyone help me with this? > >Thanks for your help, > >Deb Try: DateDiff("yyyy", [DOB], Date()) - IIF(Format([DOB], "mmdd" > Format(Date(), "mmdd"), 1, 0) to calculate the age as of the previous birthdate. -- John W. Vinson [MVP]
|
Pages: 1 Prev: Calculating age Next: Data quality software package |