Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Age calculation
Is there a way in Word2000 to calculate the age of a person based upon a REF'd date-of-birth entry in a online form?
|
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Age calculation
See http://www.gmayor.com/insert_a_date_...than_today.htm and in
particular the linkewd download from that page - http://www.gmayor.com/downloads.htm#Third_party -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Fantomegl" wrote in message ... Is there a way in Word2000 to calculate the age of a person based upon a REF'd date-of-birth entry in a online form? -- Fantomegl |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Age calculation
See http://www.gmayor.com/insert_a_date_...than_today.htm and in
particular the linkewd download from that page - http://www.gmayor.com/downloads.htm#Third_party -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Fantomegl" wrote in message ... Is there a way in Word2000 to calculate the age of a person based upon a REF'd date-of-birth entry in a online form? -- Fantomegl |
#4
|
|||
|
|||
Graham, Thanks for the link but I am still unable to figure out how to calculate the age of a subject based on a DOB entry in a form and todays date.
My form fields are "today" (the current date) and "dob" (the date of birth). All I need to calculate is years. Thanks, Robert The Dense One Quote:
|
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Age calculation
The section you are looking for is on page 13 - Interactively Calculate A
Person's Age This includes a field construction that will build the age from the date of birth and the current date (or an input date). It is better to copy the field from the document to the place where you want the age to appear, rather than to try and reconstruct it from here (you cannot paste fields from plain text messages). You would then modify the fields to work with your formfield bookmark names i.e. dob and Today as below. {QUOTE {SET by {REF dob \@ yyyy}} {SET bm { REF dob \@ M}} {SET bd { REF dob \@ d}} {SET yy {REF Today \@ yyyy}} {SET mm {REF Today \@ M}} {SET dd {REF Today \@ d}} {SET md{=IF((mm=2),28+(mm=2)*((MOD(yy,4)=0)+(MOD(yy,400 )=0)-(MOD(yy,100)=0)),31-((mm=4)+(mm=6)+(mm=9)+(mm=11)))}} {Set Years{=yy-by-(mmbm)-(mm=bm)*(ddbd) \# 0}} {Set Months{=MOD(12+mm-bm-(ddbd),12) \# 0}} {Set Days{=MOD(md+dd-bd,md) \# 0}} "{Years} Year{IF{Years}= 1 "" s}"} -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Fantomegl" wrote in message ... Graham, Thanks for the link but I am still unable to figure out how to calculate the age of a subject based on a DOB entry in a form and todays date. My form fields are "today" (the current date) and "dob" (the date of birth). All I need to calculate is years. Thanks, Robert The Dense One Graham Mayor;456462 Wrote: See http://www.gmayor.com/insert_a_date_...than_today.htm and in particular the linkewd download from that page - http://www.gmayor.com/downloads.htm#Third_party -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Fantomegl" wrote in message ...- Is there a way in Word2000 to calculate the age of a person based upon a REF'd date-of-birth entry in a online form? -- Fantomegl - -- Fantomegl |
#6
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Age calculation
The section you are looking for is on page 13 - Interactively Calculate A
Person's Age This includes a field construction that will build the age from the date of birth and the current date (or an input date). It is better to copy the field from the document to the place where you want the age to appear, rather than to try and reconstruct it from here (you cannot paste fields from plain text messages). You would then modify the fields to work with your formfield bookmark names i.e. dob and Today as below. {QUOTE {SET by {REF dob \@ yyyy}} {SET bm { REF dob \@ M}} {SET bd { REF dob \@ d}} {SET yy {REF Today \@ yyyy}} {SET mm {REF Today \@ M}} {SET dd {REF Today \@ d}} {SET md{=IF((mm=2),28+(mm=2)*((MOD(yy,4)=0)+(MOD(yy,400 )=0)-(MOD(yy,100)=0)),31-((mm=4)+(mm=6)+(mm=9)+(mm=11)))}} {Set Years{=yy-by-(mmbm)-(mm=bm)*(ddbd) \# 0}} {Set Months{=MOD(12+mm-bm-(ddbd),12) \# 0}} {Set Days{=MOD(md+dd-bd,md) \# 0}} "{Years} Year{IF{Years}= 1 "" s}"} -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Fantomegl" wrote in message ... Graham, Thanks for the link but I am still unable to figure out how to calculate the age of a subject based on a DOB entry in a form and todays date. My form fields are "today" (the current date) and "dob" (the date of birth). All I need to calculate is years. Thanks, Robert The Dense One Graham Mayor;456462 Wrote: See http://www.gmayor.com/insert_a_date_...than_today.htm and in particular the linkewd download from that page - http://www.gmayor.com/downloads.htm#Third_party -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Fantomegl" wrote in message ...- Is there a way in Word2000 to calculate the age of a person based upon a REF'd date-of-birth entry in a online form? -- Fantomegl - -- Fantomegl |
#7
|
|||
|
|||
Graham I can't thank you enough!
My forms are now working great! I simplified the construction for my form to just calculate years of age which is all I needed for my purposes. Here is the result. {QUOTE {SET by {REF dob \@ yyyy}} {SET bm { REF dob \@ M}} {SET bd { REF dob \@ d}} {SET yy {REF Today \@ yyyy}} {SET mm {REF Today \@ M}} {SET dd {REF Today \@ d}} {Set Years{=yy-by-(mmbm)-(mm=bm)*(ddbd) \# 0}} "{Years} Year{IF{Years}= 1 "" s}"} dob=date-of-birth form field bookmark Today=today's currentdate form field bookmark Thanks again, Robert Quote:
|
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Calculation | Tables | |||
Multiplicaton Calculation | Microsoft Word Help | |||
Calculation against an imported XML value/tag. | Microsoft Word Help | |||
Calculation | Tables | |||
Calculation | Tables |