Thread: [Solved] Calculate a Date
View Single Post
 
Old 12-09-2019, 02:43 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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