View Single Post
 
Old 02-13-2013, 05:19 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit 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

Your OrgDate test doesn't say "If the date is null then use current date". What it says is "If the Invoice date is null then use date_stamp date, otherwise, use the Invoice date" - both as the basis for doing a date calculation.

Be that as is may, you're using entirely the wrong field code if all you want is the first day of the next month. For that the field code would be:
Code:
{QUOTE
{SET StartDate {IF{MERGEFIELD InvoiceDate}= "" {MERGEFIELD Date_Stamp \@ M/d/yyyy} {MERGEFIELD InvoiceDate \@ M/d/yyyy}}}
{SET Delay 1}
{SET m{=MOD({StartDate\@ MM}+Delay+11,12)+1}}
{SET y{=INT({StartDate\@ yyyy}+(Delay+{StartDate\@ M}-1)/12)}}
"{m}-1-{y}" \@ "M/d/yyyy"}
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote