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: 20,433
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
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
[MS MVP - Word]
Reply With Quote