View Single Post
 
Old 05-04-2020, 07:51 PM
Charles Kenyon Charles Kenyon is offline Windows 10 Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,533
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Paul, you are correct.
He started with the wrong formula from DateCalc.
He was using the one for Month and Year but wanted to include the day. That is also found in your work.


Here it is formatted the way he wants it:
Code:
{QUOTE
{SET Delay 1}
{SET od{DATE \@ d}}
{SET oy{DATE \@ yyyy}}
{SET mm{DATE \@ M}}
{SET ld{=(mm=2)*(od=28+((MOD(oy,4)=0)+(MOD(oy,400)=0)-(MOD(oy,100)=0)))}}
{SET yy{=oy+Delay}}
{SET dd{=ld*(28+(mm=2)*((MOD(yy,4)=0)+(MOD(yy,400)=0)-(MOD(yy,100)=0)))+od*(1-ld)}}
"{mm}-{dd}-{yy}" \@ "M/d/yyyy"}
Today, it returns 5/4/2021
This is formatted for US not European date format.
Here is a document containing the field.
Attached Files
File Type: docx DateOneYearLater.docx (48.6 KB, 17 views)
Reply With Quote