#1   Report Post  
Fantomegl Fantomegl is offline
Junior Member
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default 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   Report Post  
Fantomegl Fantomegl is offline
Junior Member
 
Posts: 2
Default

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

  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default 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   Report Post  
Fantomegl Fantomegl is offline
Junior Member
 
Posts: 2
Default

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:
Originally Posted by Graham Mayor View Post
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
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculation LindaC Tables 1 December 9th 09 09:22 PM
Multiplicaton Calculation ll Microsoft Word Help 3 December 5th 08 06:10 PM
Calculation against an imported XML value/tag. JMD Microsoft Word Help 1 February 3rd 07 12:01 PM
Calculation ll Tables 4 May 9th 05 01:29 PM
Calculation LindaCoedy Tables 4 November 4th 04 03:24 PM


All times are GMT +1. The time now is 02:10 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"