![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
In my database for a 10K Run I need to calculate the age a runner will be on 3/19/2011 (using their DOB) Been using: Case(Date(Month(DOB);Day(DOB);Year(Modification))> Modification;Year(Modifica |
|
Year(DOB)-1;Year(Modification)-Year(DOB)) which gives me the age of the person on the date I open the database. How do I make it so it will show the age the runner will be on 3/19/2011? Thanks! |
)
#3
| |||
| |||
|
|
"lynne" <computer.1... (AT) gmail (DOT) com> wrote in message news:df046580-beb6-436b-aa21-47c93034861b (AT) j32g2000prh (DOT) googlegroups.com...> In my database for a 10K Run I need to calculate the age a runner will be on 3/19/2011 (using their DOB) Been using: Case(Date(Month(DOB);Day(DOB);Year(Modification))> Modification;Year(Modifica tion)- Year(DOB)-1;Year(Modification)-Year(DOB)) which gives me the age of the person on the date I open the database. How do I make it so it will show the age the runner will be on 3/19/2011? Thanks! You'll probably want to be able to change the deate you're using for the age test, so the best approach would be to create a new Global Date Field, e.g. * * * RaceDate * * Global * *Date and put it on a Layout where it's easily accessible. Then for this particular example type the date "3/19/2011" into the new Field (without the quote marks). Then you can create a duplicate of that Field you're using above and change the Modification Field to be the new RaceDate Field. i.e. * * * *RaceAge * * * *Calculation, Unstored, Number Result * * * * * = *Case(Date(Month(DOB); Day(DOB); Year(RaceDate))>RaceDate; * * * * * * * * * * * *Year(RaceDate) - Year(DOB)-1; * * * * * * * * * * * *Year(RaceDate) - Year(DOB)) Now, whenever you change the RaceDate Field's data, the RaceAge will recalculate. Note: These types of database-wide calculations can be quite slow on older computers. I use to run a similar system for triathlons around 15 years ago on a Mac Classic. I set the database to open automatically each morning when the computer was turned on and re-calculate the ages as of "today" ... it used to take about 20 minutes to go through all the records. On a modern computer it would probably take closer to 20 seconds for the same number of records. Helpful Harry * ) |
![]() |
| Thread Tools | |
| Display Modes | |
| |