Answered by:
Calculating difference between two date fields

Question
-
Hi all,
I am trying to figure out some date calculations in MS Word.
I have a word document, and I would like to have the author enter in 2 dates in two fields.
1. Date Of Birth
2. Current date
It would then take these two dates and calculate how old the person is. It would display the result in another field:
e.g. 3 example results are:
- 4 Months
- 1 Year and 5 Months
- 4 Years and 9 Months
I have been trying to figure out how to do this, and stumbled upon a resource located in the third party download apps of this website:
http://www.gmayor.com/downloads.htm
The DateCalc zip file contains an old document which would appear to have a field calculation to do exactly what i want it to do, however when i try and look at the code, my MS Word 2013 does not show me much when i press Shift-F9. So I cannot get it to work in my own document.
Any ideas from anyone on how I could get this to work?
Many Thanks
- Edited by John_199 Wednesday, April 13, 2016 2:08 PM
Wednesday, April 13, 2016 2:04 PM
Answers
-
Rather than using Alt-F9 as Hans suggests, simply make sure you select the entire field before pressing Shift-F9. FWIW, including a few characters before or after the field is sufficient to ensure the whole field gets selected.
Cheers
Paul Edstein
[MS MVP - Word]- Proposed as answer by Winnie LiangMicrosoft contingent staff Thursday, April 14, 2016 12:05 PM
- Marked as answer by Winnie LiangMicrosoft contingent staff Monday, April 25, 2016 1:42 AM
Thursday, April 14, 2016 12:59 AM -
Try pressing Alt+F9 - this toggles ALL field codes in the entire document on/off.
Regards, Hans Vogelaar (http://www.eileenslounge.com)
- Proposed as answer by Winnie LiangMicrosoft contingent staff Thursday, April 14, 2016 12:05 PM
- Marked as answer by Winnie LiangMicrosoft contingent staff Monday, April 25, 2016 1:42 AM
Wednesday, April 13, 2016 3:28 PM
All replies
-
Try pressing Alt+F9 - this toggles ALL field codes in the entire document on/off.
Regards, Hans Vogelaar (http://www.eileenslounge.com)
- Proposed as answer by Winnie LiangMicrosoft contingent staff Thursday, April 14, 2016 12:05 PM
- Marked as answer by Winnie LiangMicrosoft contingent staff Monday, April 25, 2016 1:42 AM
Wednesday, April 13, 2016 3:28 PM -
Rather than using Alt-F9 as Hans suggests, simply make sure you select the entire field before pressing Shift-F9. FWIW, including a few characters before or after the field is sufficient to ensure the whole field gets selected.
Cheers
Paul Edstein
[MS MVP - Word]- Proposed as answer by Winnie LiangMicrosoft contingent staff Thursday, April 14, 2016 12:05 PM
- Marked as answer by Winnie LiangMicrosoft contingent staff Monday, April 25, 2016 1:42 AM
Thursday, April 14, 2016 12:59 AM