Calculating age on a specific date

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(Modification)-
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!
1
lynne
1/5/2011 4:37:41 AM
comp.databases.filemaker 11109 articles. 0 followers. amosw01 (46) is leader. Post Follow

2 Replies
1862 Views

Similar Articles

[PageSpeed] 2
"lynne" <computer.1on1@gmail.com> wrote in message
news:df046580-beb6-436b-aa21-47c93034861b@j32g2000prh.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  :o)




0
Your
1/5/2011 5:27:50 AM
On Jan 4, 9:27=A0pm, "Your Name" <your.n...@isp.com> wrote:
> "lynne" <computer.1...@gmail.com> wrote in message
>
> news:df046580-beb6-436b-aa21-47c93034861b@j32g2000prh.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(Modif=
ica
> 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. =A0 =A0 =A0 RaceDate =A0 =A0 Global =A0 =A0Date
>
> 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 chan=
ge
> the Modification Field to be the new RaceDate Field.
> i.e.
> =A0 =A0 =A0 =A0RaceAge =A0 =A0 =A0 =A0Calculation, Unstored, Number Resul=
t
> =A0 =A0 =A0 =A0 =A0 =3D =A0Case(Date(Month(DOB); Day(DOB); Year(RaceDate)=
)>RaceDate;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Year(RaceDate) - Year(DOB)=
-1;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Year(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 olde=
r
> computers. I use to run a similar system for triathlons around 15 years a=
go
> on a Mac Classic. I set the database to open automatically each morning w=
hen
> 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 =A0:o)

Helpful you most certainly were Harry.  Funny, was walking along the
ocean this morning and pondering this database age query and the very
obvious (oh silly me) solution came up to make a global date field and
come home and found your answer.  You must have tossed it into the
collective consciousness when you replied.  Thank you! For of course,
it works perfectly. Many thanks.
0
lynne
1/9/2011 8:12:23 AM
Reply:
Similar Artilces:

Re: TZ bug in Date and DateTime.strftime formatter?
> !#$%#$@ (As they used to say in the comic books, not realizing that they were coding in perl) Really? I thought it was a Ruby golf solution. As a newcomer to this list I'm dismayed by the constant anti-Perl snipes. TBH its really putting me off getting involved with Ruby at all. Incidently, I also subscribe to a couple of Python lists where there isn't any of this BS. So what is it CPAN envy? "Ruby inherited the Perl philosophy of having more than one way to do the same thing. I inherited that philosophy from Larry Wall, who is my hero actually. I want to make Ruby...

MORTGAGE CALCULATOR | Mortgage Loan Calculators | Online Loan Payment Calculator
____________________________________________________ >>> MORTGAGE CALCULATOR <<< ____________________________________________________ Calculate your payment and more at http://www.MortgageCalculator.notlong.com ____________________________________________________ Looking for more personalized rates? First compare rates in your area ( or click here http://MortgageCalculator.notlong.com ), then return to our mortgage calculator to determine payment and amortization schedule. Due to record low mortgage ra...

graphing calculator
Anyone have an OSX graphing calculator app like the one that came with OS9 (http://www.pacifict.com/FreeStuff.html)? I didn't find anything at download.com Any recommendations? Thanks, GW In article <6M6Sc.3822$Qa4.1911@twister.socal.rr.com>, Geoff Welsh <geoffdubya@some.rr.com> wrote: > Anyone have an OSX graphing calculator app like the one that came with > OS9 (http://www.pacifict.com/FreeStuff.html)? I'm not familiar with earlier Mac applications, however the calculator that comes with OX X (10.3 at least) appears to have an (undocumented) 2D graphic faci...

DOS Date Retrieval
Hi, Anybody out there know a script to seperate the DOS date, month, year so as to create a file with the current time stamp as we do it in Unix using %Y, %D, %M format. Basically I am trying to create a directory with the current time stamp and within the directory the couple of files would be created with the filesname appended with the timestamp. Thansk for your help KV Here it is as a batch file, you can play with the format as you see fit. @echo off ::echo %date% > %mdate% FOR /F "tokens=1 delims=/" %%G IN ('ECHO.%Date%') DO SET nday=%%G ::echo %nday...

Re: Passing a number calculated from another dataset into a new #5
I think you want to do a "one record set". See if the example produces something similar to youe desired data. data const; array const[10] (1:10); run; data class; set sashelp.class; if _n_ eq 1 then set const; run; proc print; run; On 7/21/08, wardnine@hotmail.com <wardnine@hotmail.com> wrote: > I have a question about something which is probably simple but I just > don't know how to do. I have a pre-existing, one record dataset A > where I've calculated 10 numbers that are stored as variables within > the data set (for example, the dat...

Re: calculate median from columns #5
Kitty, It is not difficult to modify the code to use nonlinear category values. An easy way to reference category values like 7.5, 15, 25, and 55 would be to use formatting. First, construct an informat CATVALS which links each category with the appropriate category value as: proc format; invalue catvals 1 = 7.5 2 = 15 3 = 25 4 = 55; run; Then, all you need to do is replace the references to "25*i" (in either of the codings I previously provided) with "input(i,catvals.)". Note that the quotes above are just to reference the appropriate code. You wou...

Date Question?
Hi All, I need to add dates between LASTDATE & DATE. Is there any function that does this task? DATE LASTDATE DIFF 22JAN1970 . . 21FEB1970 22JAN1970 30 23MAR1970 21FEB1970 30 21APR1970 23MAR1970 29 21MAY1970 21APR1970 30 19JUN1970 21MAY1970 29 18JUL1970 19JUN1970 29 17AUG1970 18JUL1970 30 15SEP1970 17AUG1970 29 14OCT1970 15SEP1970 29 13NOV1970 14OCT1970 30 Michael There is no function in base SAS I know that will expand your dates but y...

out of the calculation
I make a statement, but can be run I can not get out of the calculation done = false; while not(done) x=input('insert x') m=1; n=3; if (m<=x)&&(x<=n) for i=x disp('true') AM=20+x; continue end else disp('false') end end JK=AM+1 I mean, if the value of x is true, then it will go to the next calculation Can you help me "wahyoe Unggul" <wahyoe_slipnot@yahoo.co.id> wrote in message <in2dj5$rcu$1@fred.mathworks.com>... > I make a statement, but can be run I can not get out of the calculat...

mount: /date/userB/Project/ADir: No such file or directoryc
trying to mount a directory from another machine on local machine # mount hostmachine:/home/user/ADir /date/userB/Project/ADir mount: /date/userB/Project/ADir: No such file or directory The directory exists on the local machine. Can anyone suggest what is wrong? ...

Re: Problem with missing values in a date column
100001 is different from 10001. The first number has 6 digits while the second has five. J S Huang 1-515-557-3987 fax 1-515-557-2422 >>> Rune Runnest� <rune@FASTLANE.NO> 1/21/2006 3:56:42 PM >>> Why does the column Birthdate get missing values in the data set EMPLOYEES_NEW ? data employees; input EmpID 6. @8 hiredate date9.; datalines; 100001 11MAR1992 100002 19DEC1983 100003 12MAR1985 100004 16OCT1989 100005 19DEC1981 ; data employees_new; set employees; if empid=10001 then Birthdate='01JAN1963'd; else if empid=10002 then Birthdate='08AUG1946&#...

Re: [VxW] Re: How to calculate a tick value?.
sysClkRateGet() will return the no.of ticks for a second. so u can use taskDelay(NUM_SECS * sysClkRateGet()) for sleeping. HTH --vrreddy svrakesh@yahoo.com (Rakesh)@csg.lbl.gov on 07/14/2003 07:59:46 AM Please respond to VxWorks Users Group List <vxwexplo@csg.lbl.gov> Sent by: vxwexplo-bounces@csg.lbl.gov To: vxwexplo@csg.lbl.gov cc: Subject: [VxW] Re: How to calculate a tick value?. better to get from CPU rather than OS. What CPU are you wroking on? santa19992000@yahoo.com (Santa) wrote in message news:<60e37826.0307131323.45cf392@posting.google.com>.....

Creating a matrix from another matrix based criteria of a specific column.
Hi Everyone, I have a matrix, A, with three columns. One of these columns include simply 0's and 1's. How do I create a matrix, lets call it ONE, that includes only the rows that have 1's in the 0-1 column? For example: 1 3 5 0 2 9 0 2 8 1 5 7 1 4 6 Should produce 1 3 5 1 5 7 1 4 6 "Ulrik Nash" <uwn@sam.sdu.dk> wrote in message <hif5vj$rtr$1@fred.mathworks.com>... > Hi Everyone, > > I have a matrix, A, with three columns. One of these columns include simply 0's and 1's. > > How do I crea...

calculation on lists
--_623c3c7f-cf2b-40e9-a420-36b7842b10cb_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable hi=2C I have a question=2C is there a tool to calculate on list ? something like : >a=3D [1=2C1=2C1=2C1] >b =3D [5=2C9=2C8=2C4] >c =3D a+b*a >print c >[6=2C10=2C9=2C5] =20 Thx = --_623c3c7f-cf2b-40e9-a420-36b7842b10cb_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <html> <head> <style><!-- ..hmmessage P { margin:0px=...

Fwd: Message ("The distribution of your message dated Wed, 31...")
Last evening I got this message from the list server. Seems we reached the daily message limit, even without "too" much off topic discussion and the rest of the why do you want to do that responses, and the double question postings. All in all an rather normal day. I think the limit of 150 is too low. ---------- Forwarded message ---------- From: L-Soft list server at UGA (1.8d) <LISTSERV@listserv.uga.edu> Date: May 31, 2006 7:34 PM Subject: Message ("The distribution of your message dated Wed, 31...") To: "Data _Null_;" <datanull@gmail.com> The ...

MORTGAGE CALCULATOR | Mortgage Loan Calculators | Online Loan Payment Calculator
____________________________________________________ >>> MORTGAGE CALCULATOR <<< ____________________________________________________ Calculate your payment and more at http://www.MortgageCalculator.notlong.com ____________________________________________________ Looking for more personalized rates? First compare rates in your area ( or click here http://MortgageCalculator.notlong.com ), then return to our mortgage calculator to determine payment and amortization schedule. Due to record low mortgage rates, many homeown...

Re: Creating a sas date #3
Hi...FYI...in V9 there's a YYMMN informat with a default width of 4...assumes the first day of the month... date=input(put(bchyrr,z2.)||put(bchmnth,z2.), yymmn.); or how about just... date = mdy(bchmnth,1,bchyrr); Mike Zdeb U@Albany School of Public Health 1 University Drive Rensselaer, NY 12144-3456 (P)518-402-6479 (F)630-604-1475 |---------+----------------------------> | | "Choate, | | | Paul@DDS" | | | <pchoate | | | Sent by: "SAS(r) | | | Discu...

Date function
Hi, could you please suggest a method to add and subtract a certain number of days to a date in Unix, i.e. the date returned by the "date" command? Thank you in advance. Br. Diego. 2004-01-29, 11:04(+00), Diego Balgera: > could you please suggest a method to add and subtract a certain number of > days to a date in Unix, i.e. the date returned by the "date" command? RTFFAQ. -- St�phane ["Stephane.Chazelas" at "free.fr"] Diego Balgera <x.nospam.diego.balgera.nospam.x@nokia.com> wrote: > could you please sugge...

Re: Question about dates.. #2
> -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On > Behalf Of Sridhar, Nagakumar > Sent: Tuesday, May 06, 2008 7:41 AM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Question about dates.. > > Hi All: > > I have some data from overseas where they've recorded the > dates in a character format. To top it, they've recorded it > in the yyyy/mm/dd. What I need to do is to put it in the > mm/dd/yyyy date9. format. > > Any suggestions would be greatly appreciated. > > > > TIA > > Kumar > Kum...

calculating Total in a textbox on a form, how can I calculate the total of several text boxes in another textbox on the same form?
I have a form with three text boxes on it. I want the third text box to show the total of the values in the other two text boxes. The first box is named: BoxOne and I type the number 2 into it The second box is named: BoxTwo and I type the number 3 into it If the third box is named: TotalBox and the control source for the TotalBox reads, =([BoxOne]+[BoxTwo]) the value in the total box is 23, not 5 It just places the two separate values side-by-side in the totalbox. If I use =([BoxOne]*[BoxTwo]) then I get 6 (two TIMES three) I tried using sum in various ways but I just got error m...

Calculating UTMz in MapInfo
Hi I have a lot of points (UTMx and UTMy) and I want to get the UTMz (elevation). I have a vectorized heigthmodel. Hov can I automatically calculate the heigth of my points interpolating between the curves in heigth-model? Lars ...

I need only the newest date
I got the follow from searching comp.soft-sys.sas. but it just giving me the newdate per cont_id.....I need the new date per cont_id and prj_nbr. Not sure if I adjusted the code right for me? Can anyone see what I am doing wrong and tell me how to correct it or is there an easier way to get what I need in a dataset? Thanks in advance. proc sort data =clean7 out = CLEAN8; by cont_id prj_nbr ; run; DATA newvards (DROP=datevar); * or explicitely KEEP variables; SET CLEAN8; BY cont_id prj_nbr datevar; * BY is required for applying FIRST and LAST; RETAIN newvar; * Declare new v...

How to calculate this duration
Hello SAS-L, I have 24 months data with each month a category, I want to calculate duration for each category and code them a change name. For example, the category are 14,24,32,48 and 0; and I want code the change to 0 as 1, from 0 to others 9, others are 14 to 24 a, 14 to 32 b, 14 to 48 c, 48 to 32 d, 32 to 14 e ,etc. The changes are random. The current data like this: id mon1 mon2 mon3 mon4 mon5 mon6 mon7 mon8 1 14 14 32 32 0 48 48 0 2 0 0 48 32 32 14 32 0 The data I need is like: id duration type 1 2 b 1...

Converting DD/MM/YYYY date format to UTC
Can anyone help me, I need a way to convert a date in DD/MM/YYYY format (the time is also present but that's not too important in this case....) into a UTC integer using ASP/VBScript....for example: The date 01/01/2006 would be converted to 1136073600 I need a formula to do this for me in ASP/VBScript.....Thanks!! *** Sent via Developersdex http://www.developersdex.com *** JRS: In article <44e4a635$0$34072$815e3792@news.qwest.net>, dated Thu, 17 Aug 2006 17:24:05 remote, seen in news:comp.lang.javascript, Matt Gyton <matt.gyton@ntlworld.com> posted : >Can anyone help...

Linux Calculator
Is there any way switch the Linux caculator from Nerd Mode to Dumb Mode ( where there is only + - X and / ) -- W '04 <:> Open In article <u%Bnc.14010$V97.9074@newsread1.news.pas.earthlink.net>, John Bailo wrote: > > Is there any way switch the Linux caculator from Nerd Mode to Dumb Mode > ( where there is only + - X and / ) Which calculator? I use bc for normal math. If you mean a gui based calc I believe most pretty much work as a normal pocket calculator. -- From the Desk of the Sysop of: Planet Maca's Opus, a Free open BBS system. Telephone 860...

T-Sql
I am using SQL Server 2000. I need to query my database for all the contracts that came in during a certain time frame (user is prompted for reportingperiodid). Table - Periods Fields - Reporting Period id int Reporting Period desc varchar(30) Reporting Period Begin Date datetime Reporting Period End Date datetime If the user selects a 3 then the begin date is Jan. 1, 2004 and the end date is June 30, 2004. Now I need to calculate did any money come in for each week in that time frame. I need to create a weekly list of all the weeks in that time frame. Each ti...