
09-21-2016, 05:33 AM
|
Moderator
|
|
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,533
|
|
If the date were the September 21, your formula would give you September 35.
Here is the field for 14 days from the CREATEDATE:
{ QUOTE "{ SET " Delay" "14" }
{ SET "DaysInMonth" { IF { CreateDate \@ "MM" } <> 2
{ = ROUND(30.575*{ CreateDate \@ "MM" },0)-
ROUND(30.575*{ = { CreateDate \@ "MM" } -1 },0) }
{ IF { = MOD( { CreateDate \@"yy" } , 4 ) } > 0 "28" "29" } } }
{ SET "NextMonth" { IF { CreateDate \@ "MM" } = 12 "1/97"
"{ = { CreateDate \@ "MM"} + 1 }/97 } }
{ IF { = { REF "Delay" } + { CreateDate \@ "dd" } } <= {REF"DaysInMonth"}
{CreateDate \@ "MMMM { = { REF "Delay" } + { CreateDate \@ "dd" } }, yyyy"}{ QUOTE { NextMonth \@ "MMMM" }
{ = { REF "Delay" } + { CreateDate \@ "dd" } - { REF"DaysInMonth" } },
{ IF { CreateDate \@ "MM" } <> 12 { CreateDate \@ "yyyy" }
{ CreateDate \@ "{ = 1 + { CreateDate \@ "yyyy" } \# "xxxx" }" } } } }" }
See Date Calculation Tutorial.
Read the introductory parts and then find the field construction you need in the tutorial. You can simply copy it from the tutorial and paste into your document.
Calculated Dates in Microsoft Word using Fields or vba
(This is the page I copied the field from.)
|