#1
|
|||
|
|||
Calculate a Date
Good Afternoon,
I am very sorry having to ask, but the "WORD date & Time Manipulation" guide is not helping me so I need to ask for help. I need to add a field to a WORD Doc that calculates a future date. It needs to take today's date, add three (3) business days (M-F) and populate the date field. How the heck do I do this? Again, it's user error when trying to use the guide, I know that. I could really use the help please. Thank you, Shawn Low |
#2
|
||||
|
||||
Using the Calculate a day, date, month and year, using n days delay example from the Microsoft Word Date Calculation Tutorial (https://www.msofficeforums.com/word/...-tutorial.html), change:
Code:
{SET jd{=d+INT((153*c+2)/5)+365*b+INT(b/4)-INT(b/100)+INT(b/400)-32045+Delay}} Code:
{SET jd{=d+INT((153*c+2)/5)+365*b+INT(b/4)-INT(b/100)+INT(b/400)-32045}} {SET jd{=jd+(MOD(jd,7)>1)*2+Delay}}
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Calculate a Date
Can I just type that on the Doc, or do I need to "Insert" it somehow, like I do with the Merge Fields?
Thanks Shawn |
#4
|
||||
|
||||
With the first line, you can simply delete '+Delay' from the existing field code.
For the second line, press Ctrl-F9 twice to create a nested pair of field braces (i.e. {{}}), then fill in the code as indicated.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
Calculate a Date
Hey Paul,
Again, Thank you for all your help with Word. I really appreciate your patience with a old guy like me, who is just not getting it. So I went back and reviewed the Tutorial you created for Calculating a Date. Under the section called "Calculate a day, date, month and year, using n days delay" there is a date that does not make sense, 24-1-5054. I assume this is Jan. 24th 5054. If I toggle open the field there are 17 lines of code. How does this work? Do I use the "Insert" feature in Word, and if so, what exactly am I inserting? Do I just start using the cntl+f9 buttons to insert the bracers, and then start typing, and using that cntl+f9 to insert a new set of bracers, until all 17 are there? You had mentioned only 2 lines above, so again, I am lost as to what I am supposed to do. I'm also not seeing where I need to set 'n'? I just need the formula to calculate 3 business days from "today" and display that date. What am I missing (aside from common sense and a working brain) Thank you, Shawn |
#6
|
||||
|
||||
The reasons for the '24-1-5054' display, and its remedy, is clearly stated in the tutorial's introduction:
Quote:
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
date calculations |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Formula to use a date to calculate an amount $. | melvin1942 | Excel | 13 | 05-22-2016 04:03 PM |
calculate date if date entered in cell, do nothing if blank | ConfuddledOne | Excel | 3 | 11-07-2014 09:37 AM |
Formula to calculate Date and Time | funkyfido | Excel | 2 | 06-25-2013 04:25 PM |
how to calculate backwards from a set finish date | ketanco | Project | 1 | 02-07-2013 06:50 AM |
Calculate date in word field | edwedw | Mail Merge | 3 | 11-30-2011 02:10 PM |