Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-09-2019, 02:04 PM
shawn.low@cox.net shawn.low@cox.net is offline Calculate a Date Windows 10 Calculate a Date Office 2016
Novice
Calculate a Date
 
Join Date: May 2019
Location: Aliso Viejo, CA.
Posts: 24
shawn.low@cox.net is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 12-09-2019, 02:43 PM
macropod's Avatar
macropod macropod is online now Calculate a Date Windows 7 64bit Calculate a Date Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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}}
to:
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]
Reply With Quote
  #3  
Old 12-09-2019, 03:11 PM
shawn.low@cox.net shawn.low@cox.net is offline Calculate a Date Windows 10 Calculate a Date Office 2016
Novice
Calculate a Date
 
Join Date: May 2019
Location: Aliso Viejo, CA.
Posts: 24
shawn.low@cox.net is on a distinguished road
Default 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
Reply With Quote
  #4  
Old 12-09-2019, 03:32 PM
macropod's Avatar
macropod macropod is online now Calculate a Date Windows 7 64bit Calculate a Date Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #5  
Old 12-12-2019, 02:41 PM
shawn.low@cox.net shawn.low@cox.net is offline Calculate a Date Windows 10 Calculate a Date Office 2016
Novice
Calculate a Date
 
Join Date: May 2019
Location: Aliso Viejo, CA.
Posts: 24
shawn.low@cox.net is on a distinguished road
Default 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


Reply With Quote
  #6  
Old 12-12-2019, 03:22 PM
macropod's Avatar
macropod macropod is online now Calculate a Date Windows 7 64bit Calculate a Date Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

The reasons for the '24-1-5054' display, and its remedy, is clearly stated in the tutorial's introduction:
Quote:
In this document, the bookmarks used to create an example are often re-used in other examples. A side effect of this is that the calculated dates and times in the examples will display a result based on the last-bookmarked entry for each reference when this document is first opened. This can be corrected by updating the affected fields (by selecting the field and pressing F9, for example), and would not affect documents where the bookmark names are not re-used.
The instructions in post #2 tell you the only modifications you need to make to the Calculate a day, date, month and year, using n days delay example in the tutorial. Post #4 gives even more detailed instructions. There is nothing more to add.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
date calculations

Thread Tools
Display Modes


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
Calculate a Date how to calculate backwards from a set finish date ketanco Project 1 02-07-2013 06:50 AM
Calculate a Date Calculate date in word field edwedw Mail Merge 3 11-30-2011 02:10 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:21 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft