![]() |
#1
|
|||
|
|||
![]()
Hi!
I am not a programmer so please ... don't be too rough on me! ![]() In an MS Word (vintage 2010) document I need to calculate age in years from a birthdate and a chosen date. I've done a lot of searching and hope this can work: Redirecting {QUOTE{SET by {BirthDate \@ yyyy}} {SET bm {BirthDate \@ M}} {SET bd {BirthDate \@ d}} {SET yy {DATE \@ yyyy}} {SET mm {DATE \@ M}} {SET dd {DATE \@ d}} {Set Years{=yy-by-(mm<bm)-(mm=bm)*(dd<bd) \# 0}} Ultimate goal: to be able to click on a dropdown calendar field(not sure if this is the correct word to use!) to choose the BirthDate, then use another dropdown calandar field(?) to enter a DATE, then have MS Word calculate the age in years between those two dates, and only display the age in years (not the BirthDate nor the DATE) in the final document. My problem is that the above code seems to refer to field code(s) and I have no idea how to work with them. Above my pay grade! But I can follow directions ![]() Please lend a guiding hand with step-by-step instructions for how to use the above code to calculate the age in years from a birthdate and another date. If the above code is not the "right stuff" please advise what I should use. Thanks so much! ![]() |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Create report for when a date is 3 years old | Daronovitz | Excel | 5 | 11-01-2022 02:42 PM |
Word 2016: How do I change a REF field code to display a reference to a Roman number as Arabic | Peggy Sue | Word | 1 | 08-15-2017 09:50 PM |
![]() |
lyiio | Excel | 3 | 08-13-2017 12:12 AM |
Is this possible? - Calculate and Display the date range between 2 specific dates | Premier-UK | Excel | 2 | 08-18-2014 05:43 AM |
![]() |
vandy | Word | 1 | 09-23-2009 11:32 AM |